Skip to content

Commit 3a728a1

Browse files
authored
Add doc for tiflash_hash_join_version system variable (#20670)
1 parent c15b979 commit 3a728a1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

system-variables.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6716,6 +6716,25 @@ For details, see [Identify Slow Queries](/identify-slow-queries.md).
67166716
- `force_streaming`: TiFlash directly sends data to the next stage of HashAgg without pre-aggregation.
67176717
- `auto`: TiFlash automatically chooses whether to perform pre-aggregation based on the current workload's aggregation degree.
67186718

6719+
### tiflash_hash_join_version <span class="version-mark">New in v9.0.0</span>
6720+
6721+
> **Warning:**
6722+
>
6723+
> The feature controlled by this variable is experimental. It is not recommended that you use it in the production environment. This feature might be changed or removed without prior notice. If you find a bug, you can report an [issue](https://github.com/pingcap/tidb/issues) on GitHub.
6724+
6725+
- Scope: SESSION | GLOBAL
6726+
- Persists to cluster: Yes
6727+
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes
6728+
- Type: Enumeration
6729+
- Default value: `legacy`.
6730+
- Value options: `legacy`, `optimized`
6731+
- This variable is used to control whether TiFlash uses an optimized version of hash join. The value is `legacy` by default, which means the optimized version is not used. If it is set to `optimized`, TiFlash uses the optimized version to execute hash join for better performance.
6732+
6733+
> **Note:**
6734+
>
6735+
> - Currently, the optimized hash join only supports inner join. For other joins, even if `tiflash_hash_join_version` is set to `optimized`, TiFlash still uses the `legacy` hash join.
6736+
> - Currently, the optimized hash join in TiFlash does not support spilling data to disk when the memory usage exceeds the limit. As a result, if both [`tiflash_mem_quota_query_per_node`](/system-variables.md#tiflash_mem_quota_query_per_node-new-in-v740) and [`tiflash_query_spill_ratio`](/system-variables.md#tiflash_query_spill_ratio-new-in-v740) are set to values greater than `0`, or if [`tidb_max_bytes_before_tiflash_external_join`](/system-variables.md#tidb_max_bytes_before_tiflash_external_join-new-in-v700) is greater than `0`, TiFlash still uses the `legacy` hash join.
6737+
67196738
### tikv_client_read_timeout <span class="version-mark">New in v7.4.0</span>
67206739

67216740
- Scope: SESSION | GLOBAL

0 commit comments

Comments
 (0)