Overview
Monitors the overall status of PS cache on all OBServer nodes for all tenants, 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 sys tenant, view the overall status of PS cache on all nodes for all tenants.
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 |
+-----------+----------------+----------+------------+-----------+--------------+----------+
| 1 | 11.xxx.xxx.xxx | 28825 | 1 | 0 | 1 | 16384 |
| 1 | 11.xxx.xxx.xxx | 28825 | 1 | 0 | 1 | 16384 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 1 | 0 | 1 | 16384 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 1 | 0 | 1 | 16384 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 1 | 0 | 1 | 16384 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 1 | 0 | 1 | 16384 |
| 1002 | 11.xxx.xxx.xxx | 28825 | 1 | 0 | 1 | 16384 |
+-----------+----------------+----------+------------+-----------+--------------+----------+
7 rows in set