tencent cloud

TDSQL Boundless

System Variables

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-07-08 17:25:19
This document provides a detailed list of system variables that can be specified using the set_var HINT in SQL.

Runtime Filter Related

System Variable
Description
Parameter Type
Default Value
Value Range
Scope
SET_VAR Hint Supported
libra_enable_runtime_filter
Whether to enable Runtime Filter.
BOOL
ON
ON: Enable Runtime Filter.
OFF: Disables the Runtime Filter.
Global & Session
Yes
libra_runtime_filter_type
Set the type of Runtime Filter that can be assigned.
VARCHAR
MIN_MAX,BLOOM_FILTER,IN_FILTER,TOPN_FILTER
BLOOM_FILTER: Builds a Bloom Filter based on the JOIN KEY from the JOIN BUILD side to filter data from the Probe side.
MIN_MAX: Builds the maximum and minimum values based on the JOIN KEY from the JOIN BUILD side to filter data from the Probe side.
IN_FILTER: Builds a value list based on the JOIN KEY from the JOIN BUILD side to filter data from the Probe side; TOPN_FILTER: A Runtime Filter based on TopN; Empty string: Disables the Runtime Filter feature.
Global & Session
Yes
libra_enable_cost_based_runtime_filter
Enable or disable the cost-based Runtime Filter.
BOOL
ON
ON: Enables 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) value on the BUILD side when generating an IN type Runtime Filter in a cost-based Runtime Filter.
INT
1024
[0, MaxInt64]
Global & Session
Yes
runtime_filter_wait_time_ms
The maximum time for the first wait for RF Ready on the RF USE side.
INT
100
Any integer
Global & Session
Yes
Note:
A negative value for runtime_filter_wait_time_ms indicates an infinite wait until the query times out or is interrupted.

Late Materialization Related

System Variable
Description
Parameter Type
Default Value
Value Range
Scope
SET_VAR Hint Supported
libra_enable_late_materialization
Whether to enable late materialization.
BOOL
ON
ON: Enable late materialization.
OFF: Disables late materialization.
Global & Session
Yes

Parallelism and Concurrency Related

System Variable
Description
Parameter Type
Default Value
Value Range
Scope
SET_VAR Hint Supported
max_threads
Query the degree of parallelism during execution.
INT
0
0 - MaxInt64 (Recommended not to exceed twice the number of CPU cores).
Global & Session
Yes
Note:
A value of 0 for max_threads indicates that the system automatically determines the parallelism based on the number of CPU cores on the node.

Execution Engine Related

System Variable
Description
Parameter Type
Default Value
Value Range
Scope
SET_VAR Hint Supported
max_bytes_before_external_agg_uniq_exact
When count distinct uses the calculation function uniqExact, the system starts to spill the HashSet to external storage when it exceeds the limit. The default value is 0, and no external storage calculation is performed.
INT
0
[0, MaxInt64]
Global & Session
Yes
agg_uniq_exact_set_one_bucket_max_temp_file_size
When count distinct uses the calculation function uniqExact, the system needs to switch to a new file for writing if the maximum value of the file flushed to disk per bucket is exceeded.
INT
68719476736
[0, MaxInt64]
Global & Session
Yes
count_distinct_implementation
The function name used for count distinct calculation.
VARCHAR
uniqExact
uniqExact: an in-memory, precise CountDistinct calculation method; uniqExactDisk: a precise CountDistinct calculation method with the feature of being flushed to disk; uniq: an approximate CountDistinct calculation method.
Global & Session
Yes
join_build_concurrency
Specifies the parallelism used for Join Build. The default value is 0, which indicates that Default or a specified MaxThreads is used.
INT
0
[0, MaxInt64]
Global & Session
Yes
enable_local_tunnel
Whether local communication optimization between the Sender and Receiver is supported.
BOOL
ON
ON: Enable Local Channel intra-host communication optimization; OFF: Disable Local Channel intra-host communication optimization.
Global & Session
Yes
mpp_max_packet_size
The maximum size of data packets sent by the Sender.
INT
0
[0, MaxInt64], where 0 indicates no limit
Global & Session
Yes
tunnel_buffer_size
The number of BUFFERs in the sending queue at the Sender end.
INT
1
[0, MaxInt64]
Global & Session
Yes
pipeline_executor_use_thread_manager
Whether the Pipeline model uses a dynamic thread pool model.
BOOL
OFF
ON: Enable the Pipeline model to use a dynamic thread pool; OFF: Disable the Pipeline model from using a dynamic thread pool.
Global & Session
Yes
enable_order_by_push_down
Enable or disable the order by push down feature.
BOOL
ON
ON: Enable the order by push down feature; OFF: Disable the order by push down feature.
Global & Session
Yes
max_block_size
Set the number of rows of the data Block transferred in the Pipeline execution engine.
INT
65409
[1, MaxInt64]
Global & Session
Yes
shuffle_after_join
Specifies whether to shuffle data to multiple Pipelines after a Join.
BOOL
OFF
ON: Enable the data shuffling feature; OFF: Disable the data shuffling feature.
Global & Session
Yes

Usage Examples

Use the SET_VAR HINT in SQL to temporarily adjust system variables within a single query, as shown in the following example:
SELECT /*+ SET_VAR(libra_enable_runtime_filter = ON) SET_VAR(max_threads = 8) */
a.id, b.name
FROM table_a a JOIN table_b b ON a.id = b.id;

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan