Note
This view is available starting with V4.0.0.
Purpose
The GV$OB_PLAN_CACHE_PLAN_EXPLAIN view displays the physical execution plans cached in the plan cache of all OBServer nodes.
Note
This view supports only GET operations. When you query this view, you must specify the IP, PORT, TENANT_ID, and PLAN_ID fields.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID. |
| SVR_IP | varchar(46) | NO | The IP address of the server. |
| SVR_PORT | bigint(20) | NO | The port number of the server. |
| PLAN_ID | bigint(20) | NO | The ID of the plan. |
| PLAN_DEPTH | bigint(20) | NO | The depth of the operator when displayed. |
| PLAN_LINE_ID | bigint(20) | NO | The ID of the operator. |
| OPERATOR | varchar(128) | NO | The name of the operator. |
| NAME | varchar(256) | NO | The name of the table. |
| ROWS | bigint(20) | NO | The estimated number of rows. |
| COST | bigint(20) | NO | The estimated cost. |
| PROPERTY | varchar(4096) | NO | The information of the corresponding operator. |
Sample query
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)