Note
This view is available starting with V4.0.0.
Overview
The V$OB_PLAN_CACHE_PLAN_EXPLAIN view displays the physical execution plans cached in the plan cache of the current OBServer node.
Note
This view only supports the GET operation. When querying, you must specify the 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 of the current OBServer node.
obclient [oceanbase]> SELECT * FROM oceanbase.V$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 | 7699 | 0 | 0 | PHY_LIMIT | NULL | 1 | 1306 | NULL |
+-----------+----------------+----------+---------+------------+--------------+-----------+------+------+------+----------+
1 row in set (0.006 sec)
