Overview
Monitors the overall status of the PS cache for the current tenant across all OBServer nodes, including hit rate, memory usage, and the number of cached items.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| SVR_IP | varchar(46) | NO | Server IP Address |
| SVR_PORT | bigint(20) | NO | Server Port Number |
| STMT_COUNT | bigint(20) | NO | How many statements are cached in the PS cache? |
| HIT_COUNT | bigint(20) | NO | Total PS Cache Hits |
| ACCESS_COUNT | bigint(20) | NO | Total Number of PS Cache Accesses |
| MEM_HOLD | bigint(20) | NO | How much memory is occupied by the PS cache? |
Sample query
In the user tenant, view the overall status of the PS cache for the current tenant across all nodes.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_PS_STAT;
The query result is as follows:
+-----------+----------------+----------+------------+-----------+--------------+----------+
| TENANT_ID | SVR_IP | SVR_PORT | STMT_COUNT | HIT_COUNT | ACCESS_COUNT | MEM_HOLD |
+-----------+----------------+----------+------------+-----------+--------------+----------+
| 1002 | 11.xxx.xxx.xxx | 28825 | 1 | 0 | 1 | 16384 |
+-----------+----------------+----------+------------+-----------+--------------+----------+
1 row in set