Parameter description: Specifies the default statistics target for table columns without a column-specific target set via ALTER TABLE SET STATISTICS. If this parameter is set to a positive number, it indicates the number of samples of statistics information. If this parameter is set to a negative number, percentage is used to set the statistic target. The negative number converts to its corresponding percentage, for example, -5 means 5%. During sampling, the random sampling size is default_statistics_target x 300. For example, if the default_statistics_target is 100, 30,000 data records from 30,000 pages are randomly sampled.
Type: USERSET
Value range: an integer ranging from -100 to 10,000
Default value: 100
Parameter description: Specifies the random function version selected by ANALYZE during data sampling. This feature is supported only in 8.1.2 or later.
Type: USERSET
Value range: enumerated values
Default value:
Parameter description: Controls the query optimizer's use of table constraints to optimize queries.
Type: USERSET
Value range: enumerated values
When constraint_exclusion is set to on, the optimizer compares query conditions with the table's CHECK constraints, and omits scanning tables for which the conditions contradict the constraints.
Default value: partition
Currently, this parameter is set to on by default to partition tables. If this parameter is set to on, extra planning is imposed on simple queries, which has no benefits. If you have no partitioned tables, set it to off.
Parameter description: Specifies the optimizer's estimated fraction of a cursor's rows that are retrieved.
Type: USERSET
Value range: a floating point number ranging from 0.0 to 1.0
Smaller values than the default value bias the optimizer towards using fast start plans for cursors, which will retrieve the first few rows quickly while perhaps taking a long time to fetch all rows. Larger values put more emphasis on the total estimated time. At the maximum setting of 1.0, cursors are planned exactly like regular queries, considering only the total estimated time and how soon the first rows might be delivered.
Default value: 0.1
Parameter description: Specifies whether the optimizer merges sub-queries into upper queries based on the resulting FROM list. The optimizer merges sub-queries into upper queries if the resulting FROM list would have no more than this many items.
Type: USERSET
Value range: an integer ranging from 1 to INT_MAX
Smaller values reduce planning time but may lead to inferior execution plans.
Default value: 8
Parameter description: Specifies whether the optimizer rewrites JOIN constructs (except FULL JOIN) into lists of FROM items based on the number of the items in the result list.
Type: USERSET
Value range: an integer ranging from 1 to INT_MAX
Default value: 8
Parameter description: Specifies whether to rewrite the FROM list to make the hint take effect, and then rewrite it again based on the from_collapse_limit and join_collapse_limit parameters. This parameter is supported by version 8.2.0 or later clusters.
Type: USERSET
Value range: Boolean
Default value: on
Parameter description: This is a commissioning parameter. Currently, it supports only OPTIMIZE_PLAN and RANDOM_PLAN. OPTIMIZE_PLAN indicates the optimal plan, the cost of which is estimated using the dynamic planning algorithm, and its value is 0. RANDOM_PLAN indicates the plan that is randomly generated. If plan_mode_seed is set to -1, you do not need to specify the value of the seed identifier. Instead, the optimizer generates a random integer ranging from 1 to 2147483647, and then generates a random execution plan based on this random number. If plan_mode_seed is set to an integer ranging from 1 to 2147483647, you need to specify the value of the seed identifier, and the optimizer generates a random execution plan based on the seed value.
Type: USERSET
Value range: an integer ranging from -1 to 2147483647
Default value: 0
Parameter description: Specifies whether the function of pushing down predicates the native data layer is enabled.
Type: SUSET
Value range: Boolean
Default value: on
Parameter description: Specifies whether to enable enhanced predicate pushdown for window functions in aggregation scenarios. (This parameter is supported by version 8.2.0 or later clusters.)
Type: SUSET
Value range: Boolean
Default value: on
Parameter description: Specifies how to pass conditions for the equivalent columns in a statement. (This parameter is supported by version 8.2.0 or later clusters.)
Type: SUSET
Value range: enumerated values
Default value: normal
Parameter description: Specifies whether the function that random query about DNs in the replication table is enabled. A complete data table is stored on each DN for random retrieval to release the pressure on nodes.
Type: USERSET
Value range: Boolean
Default value: on
Parameter description: Specifies the hash table size during HASH AGG execution.
Type: USERSET
Value range: an integer ranging from 0 to INT_MAX/2
Default value: 0
Parameter description: Specifies whether code optimization can be enabled. Currently, the code optimization uses the LLVM optimization.
Type: USERSET
Value range: Boolean
Currently, the LLVM optimization only supports the vectorized executor and SQL on Hadoop features. You are advised to set this parameter to off in other cases.
Default value: on
Parameter description: Specifies the codegen optimization strategy that is used when an expression is converted to codegen-based.
Type: USERSET
Value range: enumerated values
In the scenario where query performance reduces after the codegen function is enabled, you can set this parameter to pure. In other scenarios, do not change the default value partial of this parameter.
Default value: partial
Parameter description: Specifies whether the LLVM IR function can be printed in logs.
Type: USERSET
Value range: Boolean
Default value: off
Parameter description: The LLVM compilation takes some time to generate executable machine code. Therefore, LLVM compilation is beneficial only when the actual execution cost is more than the sum of the code required for generating machine code and the optimized execution cost. This parameter specifies a threshold. If the estimated execution cost exceeds the threshold, LLVM optimization is performed.
Type: USERSET
Value range: an integer ranging from 0 to INT_MAX
Default value: 10000
Parameter description: This sets a limit on the number of expressions that can be compiled using LLVM. If the number of expressions exceeds the limit, only the initial ones will be compiled, and an alert will be triggered. To enable the alert, run SET analysis_options="on(LLVM_COMPILE)" before executing explain performance. This parameter is supported by clusters of version 8.2.1.220 or later.
Type: USERSET
Value range: an integer ranging from –1 to INT_MAX
Default value: 500
Parameter description: Specifies whether the informational constraint optimization execution plan can be used for an HDFS foreign table.
Type: SUSET
Value range: Boolean
Default value: on
Parameter description: Specifies whether the BloomFilter optimization is used.
Type: USERSET
Value range: Boolean
Default value: on
Scenario: If in a HASH JOIN, the thread of the foreign table contains HDFS tables or column-store tables, the Bloom filter is triggered.
Constraints:
Parameter description: Specifies whether to use the extrapolation logic based on historical statistics. Using this logic may increase the accuracy of estimation for tables whose statistics have not been collected. However, there is also a possibility that the estimation is too large due to incorrect inference.
Type: USERSET
Value range: Boolean
Default value:
Parameter description: Specifies whether to allow automatic statistics collection for a table that has no statistics or a table whose amount of data modification reaches the threshold for triggering ANALYZE when a plan is generated. In this case, AUTOANALYZE cannot be triggered for foreign tables or temporary tables with the ON COMMIT [DELETE ROWS|DROP] option. To collect statistics, you need to manually perform the ANALYZE operation. If an exception occurs in the database during the execution of autoanalyze on a table, after the database is recovered, the system may still prompt you to collect the statistics of the table when you run the statement again. In this case, manually perform the ANALYZE operation on the table to synchronize statistics.
If the amount of data modification reaches the threshold for triggering ANALYZE, the amount of data modification exceeds autovacuum_analyze_threshold + autovacuum_analyze_scale_factor * reltuples. reltuples indicates the estimated number of rows in the table recorded in pg_class.
Type: SUSET
Value range: Boolean
Default value: on
Parameter description: Specifies the user-defined degree of parallelism.
Type: USERSET
Value range: an integer ranging from -64 to 64.
[1, 64]: Fixed SMP is enabled, and the system will use the specified degree.
0: SMP adaptation function is enabled. The system dynamically selects the optimal parallelism degree [1,8] (x86 platforms) for each query based on the resource usage and query plans.
[-64, -1]: SMP adaptation is enabled, and the system will dynamically select a degree from the limited range.
Default value: 1
Parameter description: Specifies the DOP multiple used to adjust the optimal DOP preset in the system when query_dop is set to 0. That is, DOP = Preset DOP x query_dop_ratio (ranging from 1 to 64). If this parameter is set to 1, the DOP cannot be adjusted.
Type: USERSET
Value range: a floating point number ranging from 0 to 64
Default value: 1
Parameter description: Specifies the unified DOP parallelism degree allocated to the groups that use the Stream operator as the vertex in the generated execution plan when the value of query_dop is 0. This parameter is used to manually specify the DOP for specific groups for performance optimization. Its format is G1,D1,G2,D2,...,, where G1 and G2 indicate the group IDs that can be obtained from logs and D1 and D2 indicate the specified DOP values and can be any positive integers.
Type: USERSET
Value range: a string
Default value: empty
This parameter is used only for internal optimization and cannot be set. You are advised to use the default value.
Parameter description: Checks whether statistics were collected about tables whose reltuples and relpages are shown as 0 in pg_class during plan generation. This parameter has been discarded in clusters of version 8.1.3 or later, but is reserved for compatibility with earlier versions. The setting of this parameter does not take effect.
Type: SUSET
Value range: Boolean
Default value: on
Parameter description: Specifies whether to use the Hash Agg operator for column-oriented hash table design when certain constraints are met.
Type: USERSET
Value range: Boolean
Default value: on
Parameter description: Specifies whether to use the Hash Join operator for column-oriented hash table design when certain constraints are met.
Type: USERSET
Value range: Boolean
Default value: on
Parameter description: Specifies whether to optimize the number of hash join or hash agg files spilled to disks in the sonic scenario. This parameter takes effect only when enable_sonic_hashjoin or enable_sonic_hashagg is enabled.
Type: USERSET
Value range: Boolean
For the hash join or hash agg operator that meets the sonic criteria, if this parameter is set to off, one file is spilled to disks for each column. If this parameter is set to on and the data types of different columns are similar, only one file (a maximum of five files) will be spilled to disks.
Default value: on
Parameter description: Specifies the expansion ratio used to resize the hash table during the execution of the Hash Agg and Hash Join operators.
Type: USERSET
Value range: a floating point number of 0 or ranging from 0.5 to 10
Default value: 0
Parameter description: Specifies the policy for generating an execution plan in the prepare statement.
Type: USERSET
Value range: enumerated values
Default value: auto
Parameter description: Specifies whether the query needs to be accelerated when short query acceleration is enabled.
Type: USERSET
Value range: an integer ranging from –1 to 1
Default value: –1
Parameter description: Specifies whether to print the alarm for the statement pushdown failure to the client.
Type: USERSET
Value range: Boolean
Default value: off
Parameter description: specifies the hash join policy for spilling data to disks. This feature is supported in 8.1.2 or later.
Type: USERSET
Value range: The value is an integer ranging from 0 to 6.
Default value: 0
Parameter description: Controls the number of Stream nodes in a query plan. (This parameter is supported only in 8.1.1 and later cluster versions.)
Type: SUSET
Value range: an integer ranging from –1 to 10000.
Default value: –1
Parameter description: Specifies whether to optimize select distinct col from table limit N. This parameter is valid only if N is less than 16,384. table indicates a column-store table. This parameter is supported only by clusters of version 8.2.0.101 or later.
Type: USERSET
Value range: Boolean
Default value: off
Parameter description: minimum number of filter criteria contained in a CTE when enable_stream_ctescan is set to on and the CTE contains only a single table filtering condition. If the value is greater than or equal to the value of this parameter, the share scan mode is used. If the value is less than the value of this parameter, the inline mode is used. This parameter is supported only by clusters of version 8.2.1 or later.
Type: SUSET
Value range: an integer ranging from 0 to INT_MAX
Default value: 2
Parameter description: maximum estimated memory value of the CTE when enable_stream_ctescan is set to on. This parameter must be used together with stream_ctescan_refcount_threshold. If the estimated memory is greater than the value of stream_ctescan_max_estimate_mem and the number of references is less than the value of stream_ctescan_refcount_threshold, the inline mode is used. Otherwise, the sharescan mode is used. This parameter is supported only by clusters of version 8.2.1 or later.
Type: SUSET
Value range: an integer ranging from 32 x 1024 (32 MB) to INT_MAX, in KB.
Default value: 256 MB
Parameter description: maximum number of times that the CTE can be referenced when enable_stream_ctescan is set to on. This parameter must be used together with stream_ctescan_max_estimate_mem. If the estimated memory is greater than the value of stream_ctescan_max_estimate_mem and the number of references is less than the value of stream_ctescan_refcount_threshold, the inline mode is used. Otherwise, the sharescan mode is used. This parameter is supported only by clusters of version 8.2.1 or later.
Type: SUSET
Value range: an integer ranging from 0 to INT_MAX
Default value: 4
This parameter takes effect only when the value is greater than 0. When the value is 0, only stream_ctescan_max_estimate_mem is used to control the inline behavior.
Parameter description: Specifies the maximum number of values in the IN condition when enable_csqual_pushdown is enabled and the filter criterion is IN for rough check pushdown. If the number of values in the IN filter condition exceeds the value of this parameter, the maximum and minimum values in the IN filter condition are used for pushdown. This parameter is supported only by clusters of version 8.2.0.101 or later.
Type: SUSET
Value range: an integer ranging from 0 to 10000
Default value: 100
If the IN condition is executed on the only distribution column of a table, values can be filtered on DNs. In this case, the maximum number of values in the IN condition is inlist_rough_check_threshold multiplied by the number of DNs.
Parameter description: whether to split the Array type generated by the IN, ANY, or ALL condition into common expressions for execution. This parameter will support multiple optimizations such as vectorized execution, rough check pruning, and partition pruning. This parameter is supported only by clusters of version 8.2.1 or later.
Type: SUSET
Value range: Boolean
Default value: on
Parameter description: controls the number of skew values allowed by the optimizer for redistribution optimization. This parameter is supported only by clusters of version 8.2.1 or later.
Type: SUSET
Value range: an integer ranging from 0 to INT_MAX
Default value: 10