Note
This view is available starting with V4.0.0.
Overview
The GV$OB_PLAN_CACHE_PLAN_EXPLAIN view displays the physical execution plans cached in the plan cache across all OBServer nodes.
Note
This view supports only the GET operation. When querying, you must specify the IP, PORT, TENANT_ID, and PLAN_ID fields.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID |
| SVR_IP | varchar(46) | NO | Server IP Address |
| SVR_PORT | bigint(20) | NO | Server Port Number |
| PLAN_ID | bigint(20) | NO | Plan ID |
| PLAN_DEPTH | bigint(20) | NO | Depth of Operator Display |
| PLAN_LINE_ID | bigint(20) | NO | Operator ID |
| OPERATOR | varchar(128) | NO | Operator name |
| NAME | varchar(256) | NO | Table name |
| ROWS | bigint(20) | NO | Estimated Number of Result Lines |
| COST | bigint(20) | NO | Estimated Cost |
| PROPERTY | varchar(4096) | NO | Information of the corresponding operator |
Sample query
Query cache refers to the physical execution plans cached in the plan cache on all OBServer nodes.
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_PLAN_CACHE_PLAN_EXPLAIN limit 1;
The query result is as follows:
+-----------+----------------+----------+---------+------------+--------------+-----------+------+------+------+----------+
| TENANT_ID | SVR_IP | SVR_PORT | PLAN_ID | PLAN_DEPTH | PLAN_LINE_ID | OPERATOR | NAME | ROWS | COST | PROPERTY |
+-----------+----------------+----------+---------+------------+--------------+-----------+------+------+------+----------+
| 1 | xx.xx.xx.xx | 2882 | 7698 | 0 | 0 | PHY_LIMIT | NULL | 2 | 998 | NULL |
+-----------+----------------+----------+---------+------------+--------------+-----------+------+------+------+----------+
1 row in set (0.003 sec)
