Updated on 2026-11-09 GMT+08:00

Statement Behavior

The object search order, statement execution timeout control, data cache and I/O scheduling, result set output format, and log level during SQL statement execution all affect query efficiency and the convenience of fault locating. This section describes the GUC parameters that control the execution of SQL statements, including search\_path, statement\_timeout, disk cache and asynchronous I/O, runtime filter, result set format, and log level. You can adjust these parameters based on service characteristics to optimize query performance and meet monitoring and troubleshooting requirements.

Parameter Description

Table 1 Statement behavior parameters

Parameter

Type

Description

search_path

String

Definition: Specifies the order in which schemas are searched when a referenced object does not specify a schema. Its value consists of one or more schema names, with different schema names separated by commas.

  • When the current session stores temporary tables in a schema, you can use the alias pg_temp to list it in the search path, for example, pg_temp, public. The schema that stores temporary tables is always searched first, before all schemas in pg_catalog and search_path, that is, it has the highest search priority. You are advised not to explicitly set pg_temp in search_path. If pg_temp is specified in search_path but not at the beginning, the system will display a message indicating that the setting is invalid, and pg_temp will still be searched first. By using the alias pg_temp, the system only searches for database objects such as tables, views, and data types in the schema that stores temporary tables, and does not search for database objects such as functions or operators in the schema.
  • The schema pg_catalog, where system catalogs reside, is always searched before all schemas specified in search_path, that is, it has the second-highest search priority (with pg_temp having the highest). You are advised not to explicitly set pg_catalog in search_path. If pg_catalog is specified in search_path but not at the beginning, the system will display a message indicating that the setting is invalid, and pg_catalog will still be searched with the second-highest priority.
  • If no particular schema is specified when an object is created, it is placed in the first named schema in search_path. If the search path is empty, an error is reported.
  • The effective value of the current search path can be detected using the SQL function current_schema. This differs from checking the value of search_path, because current_schema displays the first valid schema name in search_path.

Range: A string.

  • Setting it to an empty string ('') causes the system to convert it to a pair of double quotes.
  • Including double quotes in the setting is considered unsafe. The system converts each double quote into a pair of double quotes.

Default Value: None.

current_schema

String

Definition: Specifies the current schema.

Range: A string.

Default Value: default_db.

statement_timeout

Integer

Definition: Specifies the statement execution timeout. If the time that a statement is executed exceeds the value of this parameter (starting from the time when the server receives the command), an error is reported and the statement exits the execution.

Range: An integer ranging from 0 to 2147483647. The unit is ms.

Default Value: 0.

bytea_output

Enum

Definition: Specifies the output format of values of the bytea type.

Range: Enumerated values.

- hex: Encodes binary data into two hexadecimal digits for each byte.

- escape: Traditional PostgreSQL format. It uses an ASCII character sequence to represent a binary string and converts binary strings that cannot be represented as ASCII characters into special escape sequences.

Default Value: hex.

enable_disk_cache

Boolean

Definition: Specifies whether to enable disk cache and data prefetching. Currently, data prefetching is valid only for files in Parquet or ORC format, and disk cache is valid for files in all formats.

Range: Boolean.

- on: Enables disk cache and data prefetching.

- off: Disables disk cache and data prefetching.

Default Value: on.

disk_cache_max_size

Integer

Definition: Specifies the total size of the disk cache.

Range: An integer ranging from 512 MB to 1 PB.

Default Value: 5 GB.

enable_aio_scheduler

Boolean

Definition: Specifies whether to enable asynchronous I/O scheduling, which is the basis of asynchronous read and write.

Range:

  • on or true indicates that I/O scheduling is enabled.
  • off or false indicates that I/O scheduling is disabled.

Default Value: on.

runtime_filter_type

String

Definition: Specifies the type of the runtime filter to be used.

Range: A string.

  • all: All runtime filters are applied.
  • min_max: Only the runtime filter in join scenarios is applied, and only a min_max filter is generated in such scenarios.
  • bloom_filter: Only the runtime filter in join scenarios is applied, and after meeting certain conditions, a bloom_filter is generated for filtering.
  • global_filter: Cross-DN node runtime filter in join scenarios. Once enabled, it supports generating min_max or bloom_filter filters for data on different DNs.
  • topn_filter: The runtime filter in the TopN sorting (ORDER BY... LIMIT) scenario is applied. After this parameter is enabled, runtime filters can generate filters for excluding invalid data based on the real-time data of the TopN.
  • none: No runtime filter is used. Only the original bloom_filter remains effective for filtering.

Default Value: min_max, bloom_filter, global_filter, or topn_filter.

enable_meta_scan

Boolean

Definition: Specifies whether to enable metaScan during Iceberg query.

Range

  • on or true: Enables metaScan. That is, the DN obtains the list of files to be scanned in a distributed manner during the query.
  • off or false: Disables metaScan. That is, the CN obtains the list of files to be scanned during the query.

Default Value: true.

enable_spill_to_remote_storage

Boolean

Definition: Specifies whether to enable the spill-to-obs feature. If this parameter is set to true, the feature is enabled. In this case, the data spilled to disks is managed and controlled by the disk cache, and OBS is used as the emergency channel when the space is insufficient. If this parameter is set to false, the old spill-to-disk mode is used, and data is directly written to the local EVS disk. This parameter has a parameter dependency. When the spill-to-obs feature is enabled (enable_spill_to_remote_storage is set to true), the use_yr_as_block_cache_backend parameter must be set to false.

Range

  • on or true: Enables the feature.
  • off or false: Disables the feature.

Default Value: true.

enable_remote_cache

Boolean

Definition: Specifies whether to use the Cache service as the cross-statement cache for SQL statements. If this parameter is set to true, the Cache service is used. If this parameter is set to false, the cross-statement cache is not used. Parameter type: POSTMASTER.

Range: Boolean.

Default Value: false.

staging_folder_expire_time

Integer

Definition: Specifies the interval for automatically clearing residual temporary files in ORC and Parquet tables. By default, the residual files are automatically cleared seven days later.

Range: An int64 ranging from 12 hours to 1 year.

Default Value: 604800.

obs_result_format

Integer

Definition: Specifies the format of the result set file written to OBS and whether to enable the result set file compression function. Parameter type: USERSET.

Range

  • 0: The result set file is in JSON format and is not compressed.
  • 1: The result set file is in JSON format and is compressed using the zstd algorithm.
  • 2: The result set file is in ARROW format and is not compressed.
  • 3: The result set file is in ARROW format and is compressed using the zstd algorithm.

Default Value: 0.

resource_track_level

Enum

Definition: Specifies the type of information reported in the query_plan field of SQL monitoring data. Currently, this parameter takes effect only for the SELECT, INSERT, DELETE, UPDATE, and CREATE TABLE AS statements. Parameter type: USERSET.

Range: Enumerated values.

  • query: The query_plan field in the SQL monitoring data reports the explain information.
  • perf: The query_plan field in the SQL monitoring data reports the explain performance information.
  • operator: Collects and reports operator-level monitoring information in real time based on perf.

Default Value: perf.

external_partition_pruning_method

Enum

Definition: Specifies the ORC and Parquet table partition reading mode. Parameter type: USERSET.

Range: Enumerated values.

  • partition_list: The partition list is obtained from LakeFormation. Ensure that the partition information on LakeFormation is correct. You can use the show partitions table_name syntax to query the partition list.
  • partition_folder: The partition list is obtained from OBS by listing file directories. Ensure that the data directory on OBS is organized in the format of key1=value1/key2=value2.
  • url_filter: The partition list is obtained from LakeFormation, and the query conditions are pushed down to LakeFormation as much as possible.

Default Value: partition_list.

reader_opt_options

String

Definition: Specifies the enhanced query filtering option.

Range: A string. Multiple values can be set at the same time.

  • parquet_pushdown: Supports pushing down OR conditions of Parquet tables to the storage layer for filtering.
  • iceberg_pushdown: Supports pushing down OR conditions of Iceberg tables to the storage layer for filtering.
  • dictionary: Supports filtering rowgroups of Parquet tables based on dictionary information.
  • partition_dynamic_pruning: Supports dynamic partition pruning.
  • remove_duplicate_filter: Removes redundant Iceberg filter criteria.
  • complex_type_pushdown: Supports pushdown of complex conditions.

Default Value: parquet_pushdown, iceberg_pushdown, partition_dynamic_pruning, dictionary, complex_type_pushdown, remove_duplicate_filter, page_index, parquet_native_decoder, dict_filter_row, or balance_file_size.

log_min_messages

Enum

Definition: Controls the level of messages to be written to the server log. Parameter type: USERSET.

Range: Enumerated values. Options: debug5, debug4, debug3, debug2, debug1, info, notice, warning, error, log, fatal, and panic. Each level includes all subsequent levels. The higher the level, the fewer messages are sent to the log. For example, if the log level in log_min_messages is after error, only log, fatal, and panic logs will be printed to the server log file.

Default Value: warning.

enable_topsql_to_collector

Boolean

Definition: Specifies whether to start the background resident thread for collecting and reporting performance metrics.

Range: Boolean.

  • on or true: Enables the feature.
  • off or false: Disables the feature.

Default Value: false.