Updated on 2026-10-21 GMT+08:00

GS_SPM_BASELINE

GS_SPM_BASELINE is a system catalog in the SPM feature. Currently, this feature is not supported in the distributed system. It is a system catalog used to store baseline information. Users with the SYSADMIN permission can read the system catalog, but only the initial user can write data to the system catalog.

Table 1 GS_SPM_BASELINE columns

Name

Type

Description

sql_namespace

oid

Schema OID.

sql_hash

bigint

Unique ID of the SQL statement in the SPM.

plan_hash

bigint

Unique ID of a plan in the current SQL statement.

outline

text

Outline text, which can be used to fix a group of hints of the current plan.

cost

double precision

Total plan cost.

user

oid

User who creates the baseline.

status

integer

Baseline status. The options are as follows:

  • 0 (UNACC): indicates that the plan is not accepted.
  • 1 (ACC): indicates that the plan has been accepted.
  • 2 (FIXED): indicates a special ACC plan. The matching priority of this plan is higher than that of other ACC plan.

source

text

Baseline source.

gplan

Boolean

Determines whether the plan is a gplan.

creation_time

timestamp with time zone

Time when the baseline is created.

last_used_time

timestamp with time zone

Last time when a plan was used.

modification_time

timestamp with time zone

Time when the baseline is modified.

jump_intercept_cnt

bigint

Number of baseline interception plan changes.

invalid

Boolean

Specifies whether the current baseline is invalid.

namespace_oids

text

OID list in the current search_path. The OIDs must meet the following requirements:

  • OIDs of the schema on which the user has permissions.
  • OIDs of the existing schemas.
  • OIDs of the schemas where the non-local temporary tables are located.