Note
This view has been introduced since V4.2.0.
Purpose
This view displays the plan information collected by executing the EXPLAIN PLAN tool.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the tenant to which the plan information belongs
NoteThis field is introduced in V4.3.5 BP1. |
| DB_ID | NUMBER(38) | NO | The plan ID |
| SQL_ID | VARCHAR2(32) | NO | The query ID |
| PLAN_HASH | NUMBER(38) | NO | The schema ID to which the query belongs |
| PLAN_ID | NUMBER(38) | NO | The hash value of the plan |
| GMT_CREATE | TIMESTAMP(6) WITH LOCAL TIME ZONE | NO | The record generation time |
| OPERATOR | VARCHAR2(255) | NO | The operator name (for example, TABLE SCAN, SORT) |
| OBJECT_NODE | VARCHAR2(40) | NO | If the current operator is related to a DBLINK, this field indicates the name of the DBLINK |
| OBJECT_ID | NUMBER(38) | NO | The scan object ID (for example, the physical table ID scanned by the TABLE SCAN operator) |
| OBJECT_OWNER | VARCHAR2(128) | NO | The user to which the scan object belongs |
| OBJECT_NAME | VARCHAR2(128) | NO | The scan object name (for example, the physical table name scanned by the TABLE SCAN operator) |
| OBJECT_ALIAS | VARCHAR2(261) | NO | The alias of the scan object (for example, the alias of the physical table scanned by the TABLE SCAN operator) |
| OBJECT_TYPE | VARCHAR2(20) | NO | The scan object type (for example, SYNONYM, DBLINK, and BASIC TABLE) |
| OPTIMIZER | VARCHAR2(4000) | NO | The index-related information (for example, the number of physical rows, logical rows, rows accessed by table access, and the type and version of statistics used) |
| ID | NUMBER(38) | NO | The logical operator ID |
| PARENT_ID | NUMBER(38) | NO | The ID of the parent operator of the logical operator |
| DEPTH | NUMBER(38) | NO | The depth of the logical operator in the current plan, that is, the layer in the binary plan tree |
| POSITION | NUMBER(38) | NO | The operator that is the nth child operator of the parent operator |
| COST | NUMBER(38) | NO | The estimated cost by the optimizer |
| REAL_COST | NUMBER(38) | NO | The actual cost during the first execution of the plan (execution feedback information) |
| CARDINALITY | NUMBER(38) | NO | The estimated number of output rows of the current operator by the optimizer |
| REAL_CARDINALITY | NUMBER(38) | NO | The actual number of output rows of the current operator during the first execution of the plan (execution feedback information) |
| IO_COST | NUMBER(38) | NO | The actual I/O overhead of the current operator during the first execution of the plan (execution feedback information) |
| CPU_COST | NUMBER(38) | NO | The actual CPU overhead of the current operator during the first execution of the plan (execution feedback information) |
| BYTES | NUMBER(38) | NO | The estimated width of the data of the current operator by the optimizer |
| ROWSET | NUMBER(38) | NO | The vectorized size of the current operator |
| OTHER_TAG | VARCHAR2(4000) | NO | The hints used in the current query. This field stores only the first row of the plan. |
| PARTITION_START | VARCHAR2(4000) | NO | The partition information scanned by the TABLE SCAN operator |
| OTHER | VARCHAR2(4000) | NO | The optimization information, such as the plan type, parameterized information of the Fast Parser, Plan Note, and constraints satisfied by the plan hit |
| ACCESS_PREDICATES | VARCHAR2(4000) | NO | The expression information that needs to be accessed by the current operator |
| FILTER_PREDICATES | VARCHAR2(4000) | NO | The filter conditions of the current operator |
| STARTUP_PREDICATES | VARCHAR2(4000) | NO | The startup conditions of the current operator |
| PROJECTION | VARCHAR2(4000) | NO | The output expression information of the current operator |
| SPECIAL_PREDICATES | VARCHAR2(4000) | NO | The unique expression information of the current operator, such as the join condition, group expressions, and sort expressions |
| QBLOCK_NAME | VARCHAR2(128) | NO | The name of the query block in which the current operator is located |
| REMARKS | VARCHAR2(4000) | NO | The modification tracking information of qb_name |
| OTHER_XML | VARCHAR2(4000) | NO | OUTLINE DATA |
Sample query
In a user tenant, view the plan information collected by executing EXPLAIN PLAN on the current node for the current tenant, and show one record.
obclient [SYS]> SELECT * FROM SYS.V$OB_SQL_PLAN WHERE ROWNUM <= 1\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1004
DB_ID: 201006
SQL_ID: 87608EF09AC3942892896C42F7792955
PLAN_HASH: 3290318591324336132
PLAN_ID: 3598
GMT_CREATE: 25-MAR-25 10.00.05.020265 PM
OPERATOR: DISTRIBUTED INSERT
OBJECT_NODE: NULL
OBJECT_ID: 0
OBJECT_OWNER: NULL
OBJECT_NAME: NULL
OBJECT_ALIAS: NULL
OBJECT_TYPE: NULL
OPTIMIZER: NULL
ID: 0
PARENT_ID: -1
DEPTH: 0
POSITION: 1
COST: 13
REAL_COST: 0
CARDINALITY: 1
REAL_CARDINALITY: 0
IO_COST: 0
CPU_COST: 84
BYTES: 0
ROWSET: 1
OTHER_TAG: /*+
*/
PARTITION_START: NULL
OTHER: Plan Type:
LOCAL
Note:
Degree of Parallelisim is 1 because of table property
ACCESS_PREDICATES: NULL
FILTER_PREDICATES: NULL
STARTUP_PREDICATES: NULL
PROJECTION: NULL
SPECIAL_PREDICATES: columns([{DBMS_SCHEDULER_T1: ({DBMS_SCHEDULER_T1: (DBMS_SCHEDULER_T1.__pk_increment, DBMS_SCHEDULER_T1.COL)})}]),
column_values([T_HIDDEN_PK], [column_conv(DATE,PS:(19,0),NULL,__values.COL)])
QBLOCK_NAME: INS$1
REMARKS: stmt_id:0, INS$1
OTHER_XML: /*+
BEGIN_OUTLINE_DATA
USE_DISTRIBUTED_DML(@"INS$1")
OPTIMIZER_FEATURES_ENABLE('4.3.5.1')
END_OUTLINE_DATA
*/
1 row in set