Updated on 2026-01-04 GMT+08:00

SQL_PLAN_BASELINE

The SQL_PLAN_BASELINE view displays plan binding information, which comes from the PG_PLAN_BASELINE system catalog.

Table 1 PG_PLAN_BASELINE columns

Name

Type

Description

sql_hash

text

sql_hash of the statement

outline_name

text

Name of the outline bound to the SQL statement corresponding to the sql_hash

plan_baseline

name

Baseline name of the binding relationship

create_time

timestamp with time zone

Time when the plan binding task is created

last_modify_time

timestamp with time zone

Last modification time, that is, the time when the statement was bound to the plan for the last time

last_execute_time

timestamp with time zone

Last execution time

apply_skew_hint

boolean

Whether to apply the skew hint in the outline. This column is available in clusters of version 9.1.0 or later.

status

tinyint

Binding status. This column is available in clusters of version 9.1.1.200 or later. Available values are as follows:

  • 0: preferred
  • 1: approved (available)
  • 2: unapproved (not recommended)
  • 3: rejected

cost

float8

Cost of the plan for generating the outline. This column is available in clusters of version 9.1.1.200 or later.

normalize_cost

float8

Normalized cost calculated based on the duration, CPU usage, and memory usage of the statement in the top SQL statements. This column is reserved and not used. This column is available in clusters of version 9.1.1.200 or later.