Updated on 2025-10-10 GMT+08:00

Plan Management

planmgmt_options

Parameter description: plan management configuration item. The value of this parameter consists of multiple configuration items separated by commas (,).

Type: USERSET

Value range: a string

  • plan_save_mode_outline: saves the outline derived from the plan. (If enable_planmgmt_backend is set to off, this configuration item does not take effect.)
  • plan_save_tblnum_n: n is an integer ranging from 0 to 65535. This parameter indicates that the generated generic plan will be saved when the statement depends on n or more tables.
  • plan_save_level_topsql: saves the non-FQS generic plans that meet the topsql criteria.
  • plan_save_level_all: saves all non-FQS generic plans.
  • enable_plan_baseline: enables the use of available binding plans for the statement.

Default value: In upgrade scenarios, the default value of this parameter is the same as that in the cluster before the upgrade. In a newly installed cluster, the default value of this parameter is an empty string '', which means that the plan management function is disabled.

  • When configuring multiple compatibility items, separate adjacent ones with commas. For example:
    1
    set planmgmt_options='plan_save_mode_outline,plan_save_tblnum_4,enable_plan_baseline';
    
  • plan_save_level_topsql and plan_save_level_all are mutually exclusive.
  • When setting plan_save_mode_outline, you must set enable_planmgmt_backend to on. Otherwise, the settings do not take effect.
  • The setting of this parameter is overriding, which means that the next setting will overwrite the previous one.

enable_generate_plan_hash

Parameter description: Specifies whether to generate plan_hash for a plan.

Type: USERSET

Value range: Boolean

  • on indicates that plan_hash generation is enabled.
  • off indicates that plan_hash generation is enabled.

Default value: off

hint_option

Parameter description: Specifies the priority of manually written hints when both bind outline and manual hints are present.

Type: USERSET

Value range: enumerated values

  • bind_hints_first: When both the bind outline and manually written hints exist, the hints supported by the outline version take priority over the manual hints. For example, if the outline of version 821.001 supports leading, join, and scan hints, only these three hints in the outline will take effect, and the manually written hints of the same type will not take effect. Manually written hints other than these three types will take effect along with the outline hints.
  • ignore_manual_hints: When a statement has a bind outline, the manually written hints in the statement will be ignored.
  • ignore_bind_hints: When a statement has a bind outline, the hints in the bind outline will be ignored.

Default value: bind_hints_first