tencent cloud

TencentDB for MySQL

System Variables

Download
Focus Mode
Font Size
Last updated: 2025-05-09 11:51:24
This document details the list of variables that can be specified with set_var in SQL HINT.

Runtime Filter Related

System Variables
Description
Parameter Type
Default Value
Value Range
Scope
Support for SET_VAR Hint
libra_enable_runtime_filter
Specifies whether to enable the Runtime filter.
BOOL
ON
ON: Enables the Runtime filter.
OFF: Disables the Runtime filter.
Global & Session
Yes
libra_runtime_filter_type
Sets the Runtime filter types that can be assigned.
VARCHAR
MIN_MAX, BLOOM_FILTER, and IN_FILTER
BLOOM_FILTER: Builds a Bloom Filter on the JOIN key from the Build side to filter data on the Probe side.
MIN_MAX: Builds the minimum and maximum values of the JOIN key from the Build side to filter data on the Probe side.
IN: Builds a value list of the JOIN key from the Build side to filter data on the Probe side.
Empty string: Indicates that the Runtime Filter feature is disabled.
Global & Session
Yes
libra_enable_cost_based_runtime_filter
Enables/Disables the cost-based Runtime filter.
BOOL
ON
ON: Enables the cost-based Runtime filter assignment.
OFF: Disables cost-based Runtime Filter assignment.
Global & Session
Yes
libra_max_in_runtime_filter_ndv
The maximum NDV (Number of Distinct Values) on the BUILD side when a Runtime filter of type IN is generated in the cost-based Runtime filter.
INT
1024
0 - MaxValue
Global & Session
Yes
runtime_filter_wait_time_ms
Indicates the maximum time to wait for RF Ready for the first time on the RF USE side, where 0 means waiting indefinitely until timeout or interrupting the query execution.
INT
100
[0, MaxValue).
Global & Session
Yes

Late Materialization Related

System Variables
Description
Parameter Type
Default Value
Value Range
Scope
Support for SET_VAR Hint
libra_enable_late_materialization
Specifies whether to enable the late materialization.
BOOL
OFF
ON: Enables the late materialization.
OFF: Disables the late materialization.
Global & Session
Yes

Parallel & Concurrency Related

System Variables
Description
Parameter Type
Default Value
Value Range
Scope
Support for SET_VAR Hint
max_threads
Queries the parallelism during the execution.
INT
The number of CPU cores in a node
0 - MaxValue (recommended not to exceed twice the number of CPU cores).
Global & Session
Yes

Execution Engine Related

System Variables
Description
Parameter Type
Default Value
Value Range
Scope
Support for SET_VAR Hint

max_bytes_before_external_agg_uniq_exact
When the count distinct is using the calculation function uniqExactDisk, if the hashset exceeds this limit, it starts to switch to external memory. The default value is 0, which means no external memory calculation is performed.
INT
0
[0, MaxValue).
Global & Session
Yes
one_bucket_max_temp_file_size
The maximum size of each file allowed to be stored into the bucket when the count distinct is using the calculation function uniqExactDisk. When this size is exceeded, it is necessary to switch to a new file to write.
INT
0
[0, MaxValue).
Global & Session
Yes
count_distinct_implementation
The name of the function the count distinct uses for calculation. By default, uniqExactDisk is used.
VARCHAR
uniqExactDisk
uniqExactDisk: An accurate CountDistinct calculation method with the storage feature.
uniq: An approximate CountDistinct calculation method.
uniqExact: An accurate CountDistinct calculation method for pure memory.
-
Yes
join_build_concurrency
Specify the parallelism used for the join build. The default value is 0, which means using the default value or specifying the MaxThreads.
INT
0
[0, MaxValue).
Global & Session
Yes
enable_local_tunnel
Supports communication optimization of the local sender and receiver.
BOOL
ON
ON: Enables the local channel local communication optimization.
OFF: Disables the local channel local communication optimization.
Global & Session
Yes
mpp_max_packet_size
The maximum size of data packets sent by the sender. 0 means no limit.
INT
0
[0, MaxValue).
Global & Session
Yes
tunnel_buffer_size
The number of BUFFERs, the buffered sending queues from the sender side. The default value is 1.
INT
1
[0, MaxValue).
Global & Session
Yes
pipeline_executor_use_thread_manager
The pipeline model uses a dynamic thread pool model.
BOOL
OFF
ON: Enables the pipeline model to use a dynamic thread pool.
OFF: Disables the pipeline model from using a dynamic thread pool.
Global & Session
Yes
enable_order_by_push_down
Enables/Disables the order by push-down feature.
BOOL
ON
ON: Enables the order by push-down feature.
OFF: Disables the order by push-down feature.
Global & Session
Yes
max_block_size
Sets the rows of data blocks passed in the pipeline execution engine.
INT
65409
[1, MaxValue).
Global & Session
Yes
shuffle_after_join
Sets whether to scatter data into multiple pipelines after joins.
BOOL
ON
ON: Enables the scatter feature.
OFF: Disables the scatter feature.
Global & Session
Yes

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback