Skip to content

Commit

Permalink
Add runtime filter docs (pingcap#14352)
Browse files Browse the repository at this point in the history
  • Loading branch information
ran-huang authored Aug 7, 2023
1 parent 420797b commit 341dc72
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 14 deletions.
1 change: 1 addition & 0 deletions TOC-tidb-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
- [Wrong Index Solution](/wrong-index-solution.md)
- [Distinct Optimization](/agg-distinct-optimization.md)
- [Cost Model](/cost-model.md)
- [Runtime Filter](/runtime-filter.md)
- [Prepared Execution Plan Cache](/sql-prepared-plan-cache.md)
- [Non-Prepared Execution Plan Cache](/sql-non-prepared-plan-cache.md)
- Control Execution Plans
Expand Down
1 change: 1 addition & 0 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
- [Wrong Index Solution](/wrong-index-solution.md)
- [Distinct Optimization](/agg-distinct-optimization.md)
- [Cost Model](/cost-model.md)
- [Runtime Filter](/runtime-filter.md)
- [Prepared Execution Plan Cache](/sql-prepared-plan-cache.md)
- [Non-Prepared Execution Plan Cache](/sql-non-prepared-plan-cache.md)
- Control Execution Plans
Expand Down
12 changes: 8 additions & 4 deletions explain-joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ An index join operation using the hint [`INL_JOIN`](/optimizer-hints.md#inl_join

Index join performance is influenced by the following system variables:

* [`tidb_index_join_batch_size`](/system-variables.md#tidb_index_join_batch_size) (default value: `25000`) - the batch size of `index lookup join` operations.
* [`tidb_index_lookup_join_concurrency`](/system-variables.md#tidb_index_lookup_join_concurrency) (default value: `4`) - the number of concurrent index lookup tasks.
- [`tidb_index_join_batch_size`](/system-variables.md#tidb_index_join_batch_size) (default value: `25000`) - the batch size of `index lookup join` operations.
- [`tidb_index_lookup_join_concurrency`](/system-variables.md#tidb_index_lookup_join_concurrency) (default value: `4`) - the number of concurrent index lookup tasks.

## Hash Join

Expand Down Expand Up @@ -257,8 +257,12 @@ Query OK, 0 rows affected (0.00 sec)

Hash join performance is influenced by the following system variables:

* [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) (default value: 1GB) - if the memory quota for a query is exceeded, TiDB will attempt to spill the `Build` operator of a hash join to disk to save memory.
* [`tidb_hash_join_concurrency`](/system-variables.md#tidb_hash_join_concurrency) (default value: `5`) - the number of concurrent hash join tasks.
- [`tidb_mem_quota_query`](/system-variables.md#tidb_mem_quota_query) (default value: 1GB) - if the memory quota for a query is exceeded, TiDB will attempt to spill the `Build` operator of a hash join to disk to save memory.
- [`tidb_hash_join_concurrency`](/system-variables.md#tidb_hash_join_concurrency) (default value: `5`) - the number of concurrent hash join tasks.

### Related optimizations

TiDB provides the Runtime Filter feature, which optimizes the performance of hash join and greatly improves its execution speed. For specific optimization usage, see [Runtime Filter](/runtime-filter.md).

## Merge Join

Expand Down
Loading

0 comments on commit 341dc72

Please sign in to comment.