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

GS_SPM_SYS_BASELINE

GS_SPM_SYS_BASELINE is used to view baseline information in the database. The user with the SYSADMIN permission and initial users can access this view.

Table 1 GS_SPM_SYS_BASELINE columns

Name

Type

Description

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.

unique_sql_id

bigint

Unique ID of an SQL statement in the database.

outline

text

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

status

integer

Plan status. The options are as follows:

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

gplan

Boolean

Specifies whether the plan corresponding to the current outline is a gplan.

cost

double precision

Total plan cost.

sql_text

text

SQL text string.

param_num

integer

Number of SQL parameters.

source

text

Baseline source.

creation_time

timestamp with time zone

Time when the baseline is created.

modification_time

timestamp with time zone

Time when the baseline is modified.

jump_intercept_cnt

bigint

Number of baseline interception plan jumps.

invalid

Boolean

Specifies whether the current baseline is invalid.