From b4e2b7f431839531ddb5d51d4a31fbdf3b7a59ae Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 24 Aug 2021 16:05:27 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"System=20variables:=20update=20`broad?= =?UTF-8?q?cast=5Fjoin=5Fthreshold=5Fcount`=20and=20`broadc=E2=80=A6=20(#6?= =?UTF-8?q?181)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 77251d70505393be00958d98dbe1640192258818. --- system-variables.md | 8 ++++---- tiflash/use-tiflash.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/system-variables.md b/system-variables.md index 65f963bb2c8e7..475db3907540c 100644 --- a/system-variables.md +++ b/system-variables.md @@ -321,16 +321,16 @@ MPP is a distributed computing framework provided by the TiFlash engine, which a - Scope: SESSION | GLOBAL - Default value: `10240` -- Range: `[-1, 9223372036854775807]` -- The unit of the variable is rows. If the objects of the join operation belong to a subquery, the optimizer cannot estimate the size of the subquery result set. In this situation, the size is determined by the number of rows in the result set. If the estimated number of rows in the subquery is less than the value of this variable, the Broadcast Hash Join algorithm is used. Otherwise, the Shuffled Hash Join algorithm is used. When `tidb_broadcast_join_threshold_count = -1`, the threshold is infinitely high. +- Range: `[0, 9223372036854775807]` +- The unit of the variable is rows. If the objects of the join operation belong to a subquery, the optimizer cannot estimate the size of the subquery result set. In this situation, the size is determined by the number of rows in the result set. If the estimated number of rows in the subquery is less than the value of this variable, the Broadcast Hash Join algorithm is used. Otherwise, the Shuffled Hash Join algorithm is used. ### tidb_broadcast_join_threshold_size New in v5.0 - Scope: SESSION | GLOBAL - Default value: `104857600` (100 MiB) -- Range: `[-1, 9223372036854775807]` +- Range: `[0, 9223372036854775807]` - Unit: Bytes -- If the table size is less than the value of the variable, the Broadcast Hash Join algorithm is used. Otherwise, the Shuffled Hash Join algorithm is used. When `tidb_broadcast_join_threshold_size = -1`, the threshold is infinitely high. +- If the table size is less than the value of the variable, the Broadcast Hash Join algorithm is used. Otherwise, the Shuffled Hash Join algorithm is used. ### tidb_build_stats_concurrency diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index efbaaee2d482b..8dfbb3ac913e5 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -353,8 +353,8 @@ In the example execution plan, the `ExchangeReceiver` and `ExchangeSender` opera TiFlash provides the following two global/session variables to control whether to use Broadcast Hash Join: -- [`tidb_broadcast_join_threshold_size`](/system-variables.md#tidb_broadcast_join_threshold_count-new-in-v50): The unit of the value is bytes. If the table size (in the unit of bytes) is less than the value of the variable, the Broadcast Hash Join algorithm is used. Otherwise, the Shuffled Hash Join algorithm is used. When `tidb_broadcast_join_threshold_size = -1`, the threshold is infinitely high. -- [`tidb_broadcast_join_threshold_count`](/system-variables.md#tidb_broadcast_join_threshold_count-new-in-v50): The unit of the value is rows. If the objects of the join operation belong to a subquery, the optimizer cannot estimate the size of the subquery result set, so the size is determined by the number of rows in the result set. If the estimated number of rows in the subquery is less than the value of this variable, the Broadcast Hash Join algorithm is used. Otherwise, the Shuffled Hash Join algorithm is used. When `tidb_broadcast_join_threshold_count = -1`, the threshold is infinitely high. +- [`tidb_broadcast_join_threshold_size`](/system-variables.md#tidb_broadcast_join_threshold_count-new-in-v50): The unit of the value is bytes. If the table size (in the unit of bytes) is less than the value of the variable, the Broadcast Hash Join algorithm is used. Otherwise, the Shuffled Hash Join algorithm is used. +- [`tidb_broadcast_join_threshold_count`](/system-variables.md#tidb_broadcast_join_threshold_count-new-in-v50): The unit of the value is rows. If the objects of the join operation belong to a subquery, the optimizer cannot estimate the size of the subquery result set, so the size is determined by the number of rows in the result set. If the estimated number of rows in the subquery is less than the value of this variable, the Broadcast Hash Join algorithm is used. Otherwise, the Shuffled Hash Join algorithm is used. ## Notes