Updated on 2024-06-03 GMT+08:00

PLAN_TABLE

PLAN_TABLE displays plan information collected by EXPLAIN PLAN. Plan information is in a session-level lifecycle. After a session exits, the data will be deleted. Data is isolated between sessions and between users. This view exists in the PG_CATALOG and SYS schemas.

Table 1 PLAN_TABLE columns

Name

Type

Description

statement_id

character varying(30)

Query tag specified by a user

plan_id

bigint

Query ID

id

integer

ID of each operator in a generated plan

operation

character varying(30)

Operation description of an operator in a plan

options

character varying(255)

Operation option

object_name

name

Object name corresponding to the operation, which is not the object alias used in the query. The object name is defined by users.

object_type

character varying(30)

Object type

object_owner

name

Schema to which the object belongs. It is defined by users.

projection

character varying(4000)

Returned column information

cost

double precision

Execution cost estimated by the optimizer for an operator

cardinality

double precision

Number of rows estimated by the optimizer for an operator

remarks

character varying(4000)

Not supported. Set it to NULL.

timestamp

timestamp(0) without time zone

Not supported. Set it to NULL.

object_node

character varying(128)

Not supported. Set it to NULL.

object_alias

character varying(261)

Not supported. Set it to NULL.

object_instance

numeric

Not supported. Set it to NULL.

optimizer

character varying(255)

Not supported. Set it to NULL.

search_columns

numeric

Not supported. Set it to NULL.

parent_id

numeric

Not supported. Set it to NULL.

depth

numeric

Not supported. Set it to NULL.

position

numeric

Not supported. Set it to NULL.

bytes

numeric

Not supported. Set it to NULL.

other_tag

character varying(255)

Not supported. Set it to NULL.

partition_start

character varying(255)

Not supported. Set it to NULL.

partition_stop

character varying(255)

Not supported. Set it to NULL.

partition_id

numeric

Not supported. Set it to NULL.

other

character varying

Not supported. Set it to NULL.

other_xml

clob

Not supported. Set it to NULL.

distribution

character varying(20)

Not supported. Set it to NULL.

cpu_cost

numeric

Not supported. Set it to NULL.

io_cost

numeric

Not supported. Set it to NULL.

temp_space

numeric

Not supported. Set it to NULL.

access_predicates

character varying(4000)

Not supported. Set it to NULL.

filter_predicates

character varying(4000)

Not supported. Set it to NULL.

time

numeric

Not supported. Set it to NULL.

qblock_name

character varying(128)

Not supported. Set it to NULL.

  • A valid object_type value consists of a relkind type defined in PG_CLASS (TABLE, INDEX, SEQUENCE, VIEW, COMPOSITE TYPE, or TOASTVALUE TOAST) and the rtekind type used in the plan (SUBQUERY, JOIN, FUNCTION, VALUES, CTE, or REMOTE_QUERY).
  • For RangeTableEntry (RTE), object_owner is the object description used in the plan. Non-user-defined objects do not have object_owner.
  • Information in the statement_id, object_name, object_owner, and projection columns is stored in letter cases specified by users and information in other columns is stored in uppercase.
  • PLAN_TABLE supports only SELECT and DELETE and does not support other DML operations.