Note
This view is available starting with V4.0.0.
Overview
Displays the overall status of each plan cache on all OBServer nodes for the current tenant.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| SVR_IP | VARCHAR2(32) | NO | Server IP Address |
| SVR_PORT | NUMBER(38) | NO | Server Port Number |
| SQL_NUM | NUMBER(38) | NO | Number of SQL Statements Involved in Plan Cache |
| MEM_USED | NUMBER(38) | NO | Memory Used by Plan Cache, in Bytes |
| MEM_HOLD | NUMBER(38) | NO | Memory Held by Plan Cache, in Bytes |
| ACCESS_COUNT | NUMBER(38) | NO | Number of Queries Accessing Plan Cache |
| HIT_COUNT | NUMBER(38) | NO | Number of Hits in Plan Cache |
| HIT_RATE | NUMBER(38) | NO | Plan Cache Hit Rate |
| PLAN_NUM | NUMBER(38) | NO | Number of Plans |
| MEM_LIMIT | NUMBER(38) | NO | The maximum memory for the plan cache, in bytes. |
| HASH_BUCKET | NUMBER(38) | NO | Number of Buckets in Plan Cache Hash Map |
| STMTKEY_NUM | NUMBER(38) | NO | Number of stmt_keys in plan_cache |
Sample query
In a user tenant, view the overall status of the plan cache for the current tenant across all nodes.
obclient [SYS]> SELECT * FROM SYS.GV$OB_PLAN_CACHE_STAT;
The query result is as follows:
+----------------+----------+---------+----------+----------+--------------+-----------+----------+----------+-----------+-------------+-------------+
| SVR_IP | SVR_PORT | SQL_NUM | MEM_USED | MEM_HOLD | ACCESS_COUNT | HIT_COUNT | HIT_RATE | PLAN_NUM | MEM_LIMIT | HASH_BUCKET | STMTKEY_NUM |
+----------------+----------+---------+----------+----------+--------------+-----------+----------+----------+-----------+-------------+-------------+
| 11.xxx.xxx.xxx | 28825 | 477 | 12644786 | 88080384 | 5381284 | 5377454 | 99 | 477 | 214748360 | 49157 | 0 |
+----------------+----------+---------+----------+----------+--------------+-----------+----------+----------+-----------+-------------+-------------+
1 row in set
