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

AI Features

enable_hypo_index

Parameter description: Specifies whether the database optimizer considers the created virtual index when executing EXPLAIN. By executing EXPLAIN on a specific query statement, you can evaluate whether the index can improve the execution efficiency of the query statement based on the execution plan provided by the optimizer. This parameter can be set at the PDB level.

Parameter type: Boolean

Unit: none

Value range:

  • on: A virtual index is created when the EXPLAIN command is executed.
  • off: No virtual index is created when the EXPLAIN command is executed.

Default value: off. In the PDB scenario, if this parameter is not set, the global setting is inherited.

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 2.

Setting suggestion: Set the value based on service requirements.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

enable_ai_stats

Parameter description: Specifies whether to create or use intelligent statistics.

Parameter type: Boolean

Unit: none

Value range:

  • on: Intelligent statistics are created and used.
  • off: Intelligent statistics are not created or used.

Default value: off

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If you modify the settings during database running, the plan may deteriorate.

multi_stats_type

Parameter description: Specifies the type of statistics to be created when enable_ai_stats is set to on.

Parameter type: enumerated type

Unit: none

Value range: "BAYESNET", "MCV", and "ALL"

  • "BAYESNET": Only intelligent statistics are created.
  • "MCV": Only traditional statistics are created.
  • "ALL": Both traditional statistics and intelligent statistics are created.

Default value: "BAYESNET"

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

ai_stats_cache_limit

Parameter description: Specifies the maximum number of models that can be cached when enable_ai_stats is set to on.

Parameter type: integer.

Unit: none

Value range: 30 to 1000

Default value: 100

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Set this parameter based on the number of multi-column statistics models.

Risks and impacts of improper settings: If the value is too large, unnecessary memory is occupied. If the value is too small, models are frequently read from hard disks, deteriorating system performance.

enable_operator_prefer

Parameter description: Specifies whether to enable the operator preference rule. If the estimated costs are similar, the parameterized path is preferred for table join.

Parameter type: Boolean

Unit: none

Value range:

  • on: Parameterized path preference is enabled.
  • off: Parameterized path preference is disabled.

Default value: off

There are two prerequisites for this parameter to take effect:

  • The parameterized path is generated.
  • The estimated cost of the parameterized path is similar to that of other index scan operators.

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value. You are advised to specify this parameter only in sessions or hints.

Risks and impacts of improper settings: If this parameter is modified, the plan may deteriorate.

enable_adaptive_cost

Parameter description: Specifies whether to enable the feedback-based optimizer cardinality and cost correction functions. If this parameter is enabled, the processes of collecting operator information and estimating cardinality are enabled, and the thread for starting backend model maintenance is enabled; otherwise, the thread exits.

Parameter type: Boolean

Unit: none

Value range:

  • on: The operator information and cardinality estimation processes are enabled.
  • off: The operator information and cardinality estimation processes are disabled.

Default value:

  • on: default value of the newly installed database.
  • off: default value of the database in versions earlier than 506.0.0 after the database is upgraded.

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value. Enable or disable this parameter based on whether automatic optimization is required for query statements.

Risks and impacts of improper settings: If this function is not required, for example, no complex statement that needs to be optimized exists in the service, enabling this function occupies more system resources.

enable_feedback_cardest

Parameter description: Specifies whether to enable the feedback-based optimizer cardinality and cost correction functions. This parameter is used by developers to diagnose model-related problems. If enable_adaptive_cost is set to off, and this parameter is set to on, the operator information is still collected and the API of cardinality estimation feedback is still called. However, in this case, the thread for backend automatic model maintenance is not enabled. Developers can use the gs_acm_analyze_workload_manual() function to manually train models for diagnosing problems.

Parameter type: Boolean

Unit: none

Value range:

  • on: The operator information is collected, and the API of cardinality estimation feedback is still called. However, the backend automatic model maintenance thread is not enabled.
  • off: The enable_adaptive_cost parameter takes full control.

Default value:

  • on: default value of the newly installed database.
  • off: default value of the database in versions earlier than 506.0.0 after the database is upgraded.

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

adaptive_cardest_strategy

Parameter description: Specifies the preference of the selection cardinality estimation model.

Parameter type: enumerated type

Unit: none

Value range: "auto", "use_statistics", and "use_feedback".

  • "auto": adaptive mode. In this mode, the system automatically determines whether to use the statistical method or feedback method based on the estimation accuracy in the history.
  • "use_statistics": Statistics are preferentially used for cardinality estimation.
  • "use_feedback": The feedback model is preferentially used for cardinality estimation.

Default value: "auto"

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If this parameter is modified during system running, the plan may deteriorate.

maximal_feedback_model_num

Parameter description: Specifies the maximum number of cardinality feedback models. If the actual number exceeds the value of this parameter, no new models will be trained.

Parameter type: integer.

Unit: none

Value range: –1 to 1000000. -1 indicates no limit.

Default value: 10000

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, the feedback cardinality estimation function may become invalid because new models cannot be trained. If the value is too large, too much disk space may be occupied, causing performance deterioration.

feedback_model_cache_limit

Parameter description: Specifies the maximum number of cardinality feedback models that can be cached in the global memory.

Parameter type: integer.

Unit: none

Value range: 10 to 100000

Default value: 500

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too large, unnecessary memory is occupied. If the value is too small, models are frequently read from hard disks, deteriorating system performance.

feedback_model_expired_time

Parameter description: Specifies the timeout interval for cardinality feedback models (check using gs_abo_model_statistic), which is used to clear expired models periodically.

Parameter type: integer.

Unit: milliseconds

Value range: 500 to 2147483647

Default value: 86400000 (that is, 1 day)

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 6000 without a unit, feedback_model_expired_time indicates 6000 ms. If the value is 1min, feedback_model_expired_time indicates 1 minute (that is, 60000 ms). The unit must be ms, s, min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the timeout interval is too long, the system performance deteriorates. If the timeout interval is too short, the model is cleared frequently, affecting functions.

feedback_collection_expired_time

Parameter description: Specifies the timeout interval for feeding back information about untrained operators. You can view the operator feedback information by using gs_stat_get_acm_feedback_operator_info(). Expired operator information is periodically deleted.

Parameter type: integer.

Unit: milliseconds

Value range: 50 to 2147483647

Default value: 3600000 (that is, 1 hour)

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 6000 without a unit, feedback_collection_expired_time indicates 6000 ms. If the value is 1min, feedback_collection_expired_time indicates 1 minute (that is, 60000 ms). The unit must be ms, s, min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the timeout interval is too long, the system performance deteriorates. If the timeout interval is too short, the feedback data is cleared frequently, affecting functions.

adaptive_cost_min_time

Parameter description: Specifies the execution duration threshold of SQL statements for cardinality feedback collection. Only the feedback of statements whose execution duration is greater than the value of this parameter is collected.

Parameter type: integer.

Unit: milliseconds

Value range: 0 to 2147483647

Default value: 1000

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1. For example, if the value is 6000 without a unit, adaptive_cost_min_time indicates 6000 ms. If the value is 1min, adaptive_cost_min_time indicates 1 minute (that is, 60000 ms). The unit must be ms, s, min, h, or d if required.

Setting suggestion: You are advised to set this parameter to 20% of the execution duration of slow queries to be tuned.

Risks and impacts of improper settings: If the value is too small, the system performance deteriorates by 1% to 2%. If the value is too large, the query that can be automatically optimized does not take effect.

cost_update_window_size

Parameter description: Specifies the size of the sliding window for collecting regression data.

Parameter type: integer.

Unit: none

Value range: 1 to 20

Default value: 5

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the parameter value is less than 3, the estimated cost parameter may be overfitting and the actual situation may be incorrect. As a result, the optimizer generates an incorrect execution plan.

adaptive_costest_strategy

Parameter description: Specifies whether the new or old cost model is used for cost evaluation.

Parameter type: enumerated type

Unit: none

Value range:

  • l0: The new cost model is triggered only when the cardinality estimation is correct (for example, using the cardinality estimation feedback).
  • l1: The new cost model is preferentially used for calculation.

Default value: l0

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value. You are advised to modify this parameter only in sessions or hints.

Risks and impacts of improper settings: If this parameter is set to l1, there is a serious risk of plan deterioration.

adaptive_costmodel_calibration_interval

Parameter description: Specifies the interval at which the cost model correction logic is triggered.

Parameter type: integer.

Unit: milliseconds

Value range: 0 to 2147483647. The value 0 indicates that the cost models are not automatically corrected.

Default value: 3600000 (that is, 1 hour)

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 6000 without a unit, adaptive_costmodel_calibration_interval indicates 6000 ms. If the value is 1min, adaptive_costmodel_calibration_interval indicates 1 minute (that is, 60000 ms). The unit must be ms, s, min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, the cost model frequently triggers the correction function, deteriorating the system performance. If the value is too large, the model cannot be corrected in a timely manner, affecting the function optimization effect.

adaptcost_extended_feature

Parameter description: Specifies whether to enable the adaptive cost extension function.

Parameter type: string.

Unit: none

Value range:

  • none: No adaptive cost extension function is used.
  • support_or: Operators that contain the OR and IN conditions are supported.
  • support_left_join: Operators that contain the leftjoin or rightjoin condition are supported.
  • support_stream_cost: Adaptive cost estimation of the stream operator is supported.
  • use_knn_support: The KNN model is preferentially used to support the IN/OR and leftjoin/rightjoin operators.

Default value: "support_or,support_left_join,support_stream_cost,use_knn_support"

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Some operators may fail to use the adaptive cost and the plan cannot be optimized.

enable_collect_abo_history

Parameter description: Specifies whether to enable the persistence of feedback cardinality/cost estimation information.

Parameter type: Boolean

Unit: none

Value range:

  • on: The feedback cardinality/cost estimation information is collected.
  • off: The feedback cardinality/cost estimation information is not collected.

Default value: on

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If this function is not required, for example, no complex statement that needs to be optimized exists in the service, enabling this function occupies more system resources.

feedback_record_expired_time

Parameter description: Specifies the timeout interval of records in the gs_abo_history system catalog. Records that exceed the timeout interval are periodically deleted.

Parameter type: integer.

Unit: milliseconds

Value range: 500 to 2147483647

Default value: 86400000 (that is, 1 day)

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 6000 without a unit, feedback_record_expired_time indicates 6000 ms. If the value is 1min, feedback_record_expired_time indicates 1 minute (that is, 60000 ms). The unit must be ms, s, min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the timeout interval is too long, the system performance deteriorates. If the timeout interval is too short, the record is cleared frequently, affecting functions.

enable_ai_watchdog

Parameter description: Enables or disables the AI watchdog function.

Parameter type: Boolean

Unit: none

Value range:

  • on: enabled.
  • off: disabled.

Default value: on

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Enabling this function occupies system resources.

enable_ai_watchdog_forcible_oom_detection

Parameter description: Forcibly enables or disables the OOM detection function of the AI watchdog. If this parameter is disabled, the system automatically determines whether to enable the OOM detection function based on the current database specifications. In automatic determination mode, the OOM detection function is enabled only when max_process_memory is set to 64GB or a larger value. The OOM detection function depends on the information obtained by the memory management module. Therefore, if the memory management module is disabled or invalid, the OOM detection function is not enabled.

Parameter type: Boolean

Unit: none

Value range:

  • on: enabled.
  • off: disabled.

Default value: off

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Enabling this function occupies system resources.

enable_ai_watchdog_healing

Parameter description: Enables or disables the self-healing function of the AI watchdog.

Parameter type: Boolean

Unit: none

Value range:

  • on: enabled.
  • off: disabled.

Default value: on

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

ai_watchdog_max_cpu_usage

Parameter description: Specifies the expected upper limit of the database CPU usage. The value is normalized based on the multi-core situation. If this parameter is set to 0, the system does not check the CPU usage.

Parameter type: floating-point number

Unit: none

Value range: 0 to 1

Default value: 0.8

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too large, exceptions may not be detected in a timely manner.

ai_watchdog_oom_dynamic_used_threshold

Parameter description: Specifies the expected upper limit of the dynamic memory usage of the database.

Parameter type: floating-point number

Unit: none

Value range: 0 to 1

Default value: 0.95

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too large, exceptions may not be detected in a timely manner.

ai_watchdog_oom_growth_confidence

Parameter description: Specifies the confidence level of the OOM detection algorithm.

Parameter type: floating-point number

Unit: none

Value range: 0.1 to 1

Default value: 0.95

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

ai_watchdog_oom_malloc_failures

Parameter description: Specifies the maximum number of consecutive memory allocation failures tolerated. If the number of consecutive memory allocation failures exceeds this value, the OOM detection function may be triggered.

Parameter type: integer.

Unit: none

Value range: 1 to 32000

Default value: 50

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, alarms are frequently generated. If this value is too large, exceptions cannot be detected in a timely manner.

ai_watchdog_oom_other_used_memory_threshold

Parameter description: Specifies the expected upper limit of memory usage of other parts of the database.

Parameter type: integer.

Unit: MB

Value range: –1 to 1048576

Default value: The value varies according to the following situations:

  1. If this parameter is set through the OM installation, the default value is -1.

    When the value is -1, the upper limit of the other parts of the memory usage is specified based on the following rules:

    1. If the value of max_process_memory is less than 300 GB, the upper limit of the other parts of the memory usage is 20 GB.
    2. If the value of max_process_memory is greater than or equal to 300 GB and less than 600 GB, the upper limit of the other parts of the memory usage is 40 GB.
    3. If the value of max_process_memory is greater than or equal to 600 GB, the upper limit of the other parts of the memory usage is 60 GB.

    If the default value -1 is not used, the upper limit of the other parts of the memory usage is the value set by the user.

  2. If this parameter is not set through the OM installation, the default value is 20480.

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, alarms are frequently generated. If this value is too large, exceptions cannot be detected in a timely manner.

ai_watchdog_oom_process_threshold

Parameter description: Specifies the expected percentage of the database process usage to the value of max_process_memory. When the threshold is reached, memory leakage determination is triggered.

Parameter type: floating-point number

Unit: none

Value range: 0 to 10

Default value: The value varies according to the following situations:

  1. If this parameter is set through the OM installation, the default value is 1.
  2. If this parameter is not set through the OM installation, the default value is 1.1.

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

ai_watchdog_oom_shared_threshold

Parameter description: Specifies the expected upper limit of the shared memory usage of the database.

Parameter type: floating-point number

Unit: none

Value range: 0 to 1

Default value: 0.4

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

ai_watchdog_rto_restriction_time

Parameter description: Specifies the RTO threshold of the AI watchdog self-healing function. If the RTO threshold is exceeded, self-healing is not performed.

Parameter type: integer.

Unit: seconds

Value range: 0 to 36000

Default value: 600

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. The value cannot contain a unit.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

ai_watchdog_tolerance_times

Parameter description: Specifies the maximum number of consecutive abnormal events that can be tolerated by the AI watchdog before self-healing is started. This parameter can be used to avoid incorrect operations.

Parameter type: integer.

Unit: none

Value range: 0 to 100

Default value: 4

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

ai_watchdog_tps_threshold

Parameter description: Specifies the lower limit of the expected TPS usage of the database instance. If the TPS usage is lower than the value of this parameter, the exception determination logic is triggered.

Parameter type: integer.

Unit: none

Value range: 0 to 32000

Default value: 2

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

ai_watchdog_wait_time

Parameter description: Adjusts the waiting time. To prevent the database from frequently performing self-healing operations, the database waits for a period of time after startup.

Parameter type: integer.

Unit: seconds

Value range: 0 to 36000

Default value: 1800

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. The value cannot contain a unit.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, false alarms may be reported when the database is just started. If the value is too large, exceptions within the waiting time may not be detected.

ai_watchdog_warning_retention

Parameter description: Specifies the maximum number of alarm records that the AI watchdog can retain in the dbe_perf.ai_watchdog_detection_warnings view.

Parameter type: integer.

Unit: none

Value range: 0 to 32000

Default value: 20

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.