diff --git a/explain-index-merge.md b/explain-index-merge.md index 4fd15aa1ce63e..5c63244a137a4 100644 --- a/explain-index-merge.md +++ b/explain-index-merge.md @@ -92,7 +92,7 @@ When using the intersection-type index merge to access tables, the optimizer can > > - You can use the SQL hint [`USE_INDEX_MERGE`](/optimizer-hints.md#use_index_merget1_name-idx1_name--idx2_name-) to force the optimizer to apply Index Merge, regardless of the setting of `tidb_enable_index_merge`. To enable Index Merge when the filtering conditions contain expressions that cannot be pushed down, you must use the SQL hint [`USE_INDEX_MERGE`](/optimizer-hints.md#use_index_merget1_name-idx1_name--idx2_name-). > -> - If the optimizer can choose the single index scan method (other than full table scan) for a query plan, the optimizer will not automatically use index merge. For the optimizer to use index merge, you need to use the optimizer hint. Starting from v8.1.0, you can remove this limitation by setting [Optimizer Fix Control 52869](/optimizer-fix-controls.md#52869-new-in-v810). Removing this limitation enables the optimizer to choose index merge automatically in more queries, but might cause the optimizer to ignore the optimal execution plans. Therefore, it is recommended to conduct sufficient tests on actual use cases before removing this limitation to make sure that it will not cause performance regressions. +> - When [Optimizer Fix Control 52869](/optimizer-fix-controls.md#52869-new-in-v810) is set to `OFF`, if the optimizer can choose the single index scan method (other than full table scan) for a query plan, the optimizer will not automatically use index merge. To use index merge, you need to use the optimizer hint. Starting from v8.1.0, you can remove this limitation by enabling this fix control; starting from v8.5.7, its default value is changed to `ON`, and the preceding limitation is removed by default. This enables the optimizer to choose index merge automatically in more queries. > > - Index Merge is not supported in [temporary tables](/temporary-tables.md) for now. > diff --git a/optimizer-fix-controls.md b/optimizer-fix-controls.md index b75d1033235be..c4251f75f5707 100644 --- a/optimizer-fix-controls.md +++ b/optimizer-fix-controls.md @@ -103,10 +103,10 @@ SET SESSION tidb_opt_fix_control = '44262:ON,44389:ON'; ### [`52869`](https://github.com/pingcap/tidb/issues/52869) New in v8.1.0 -- Default value: `OFF` +- Default value: `ON`. Before v8.5.7, the default value is `OFF`. - Possible values: `ON`, `OFF` -- As stated in the **Note** of [Explain Statements Using Index Merge](/explain-index-merge.md#examples), if the optimizer can choose the single index scan method (other than full table scan) for a query plan, the optimizer will not automatically use index merge. -- You can remove this limitation by enabling this fix control. Removing this limitation enables the optimizer to choose index merge automatically in more queries, but might cause the optimizer to ignore the optimal execution plans. Therefore, it is recommended to conduct sufficient tests on actual use cases before removing this limitation to make sure that it will not cause performance regressions. +- When this fix control is set to `OFF`, if the optimizer can choose the single index scan method (other than full table scan) for a query plan, the optimizer will not automatically use index merge. For more details, see the **Note** in [Explain Statements Using Index Merge](/explain-index-merge.md#examples). +- When this fix control is set to `ON`, the preceding limitation is removed, and the optimizer can choose index merge automatically in more queries. However, due to factors such as inaccurate cost estimation, the optimizer might miss the otherwise optimal execution plan. ### [`54337`](https://github.com/pingcap/tidb/issues/54337) New in v8.3.0