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
| 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.
Range: A string.
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:
Default Value: on. |
| runtime_filter_type | String | Definition: Specifies the type of the runtime filter to be used. Range: A string.
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
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
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
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.
Default Value: perf. |
| external_partition_pruning_method | Enum | Definition: Specifies the ORC and Parquet table partition reading mode. Parameter type: USERSET. Range: Enumerated values.
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.
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.
Default Value: false. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot