From efdf11ee1a470b8ebf926305b4351b0bc2e33f19 Mon Sep 17 00:00:00 2001 From: Yuanjia Zhang Date: Fri, 13 Dec 2024 14:14:27 +0800 Subject: [PATCH] This is an automated cherry-pick of #19520 Signed-off-by: ti-chi-bot --- optimizer-fix-controls.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/optimizer-fix-controls.md b/optimizer-fix-controls.md index 0fc68bc3fce56..5beefc9150efb 100644 --- a/optimizer-fix-controls.md +++ b/optimizer-fix-controls.md @@ -71,6 +71,39 @@ SET SESSION tidb_opt_fix_control = '44262:ON,44389:ON'; - This variable sets the threshold for the optimizer's heuristic strategy to select access paths. If the estimated rows for an access path (such as `Index_A`) is much smaller than that of other access paths (default `1000` times), the optimizer skips the cost comparison and directly selects `Index_A`. - `0` means to disable this heuristic strategy. +<<<<<<< HEAD +======= +### [`45798`](https://github.com/pingcap/tidb/issues/45798) New in v7.5.0 + +- Default value: `ON` +- Possible values: `ON`, `OFF` +- This variable controls whether Plan Cache is allowed to cache execution plans that access [generated columns](/generated-columns.md). + +### [`46177`](https://github.com/pingcap/tidb/issues/46177) New in v6.5.6, v7.1.3 and v7.5.0 + +- Default value: `ON` +- Possible values: `ON`, `OFF` +- This variable controls whether the optimizer explores enforced plans during query optimization after finding an unenforced plan. + +### [`47400`](https://github.com/pingcap/tidb/issues/47400) New in v8.4.0 + +- Default value: `ON` +- Possible values: `ON`, `OFF` +- Due to challenges in accurately estimating the number of qualified rows for each plan step in a query plan, the optimizer might estimate a smaller value for `estRows`. This variable controls whether to limit the minimum value of `estRows`. +- `ON`: limits the minimum value of `estRows` to 1, which is the new behavior introduced in v8.4.0 and is consistent with other databases, such as Oracle and DB2. +- `OFF`: disables the minimum row estimate limit, which maintains the behavior consistent with versions before v8.4.0. In this case, `estRows` might be zero. + +### [`52592`](https://github.com/pingcap/tidb/issues/52592) New in v8.4.0 + +- Default value: `OFF` +- Possible values: `ON`, `OFF` +- This variable controls whether to disable the `Point Get` and `Batch Point Get` operators for query execution. The default value `OFF` means that `Point Get` and `Batch Point Get` can be used for query execution. If set to `ON`, the optimizer disables `Point Get` and `Batch Point Get`, forcing the selection of Coprocessor for query execution. +- `Point Get` and `Batch Point Get` do not support column projection (that is, they cannot return only a subset of the columns), so in some scenarios, their execution efficiency might be lower than that of the Coprocessor, and setting this variable to `ON` can improve query performance. The following are recommended scenarios for setting this variable to `ON`: + + - Wide tables with many columns, where only a few columns are queried. + - Tables with large JSON values, where the JSON column is not queried, or only a small portion of the JSON column is queried. + +>>>>>>> 29a7c8d136 (planner: update the fix-control doc (#19520)) ### [`52869`](https://github.com/pingcap/tidb/issues/52869) New in v8.1.0 - Default value: `OFF`