Skip to content

Commit

Permalink
This is an automated cherry-pick of pingcap#19520
Browse files Browse the repository at this point in the history
Signed-off-by: ti-chi-bot <[email protected]>
  • Loading branch information
qw4990 authored and ti-chi-bot committed Dec 13, 2024
1 parent 53ae27d commit efdf11e
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions optimizer-fix-controls.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) <span class="version-mark">New in v7.5.0</span>

- 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) <span class="version-mark">New in v6.5.6, v7.1.3 and v7.5.0</span>

- 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) <span class="version-mark">New in v8.4.0</span>

- 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) <span class="version-mark">New in v8.4.0</span>

- 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) <span class="version-mark">New in v8.1.0</span>
- Default value: `OFF`
Expand Down

0 comments on commit efdf11e

Please sign in to comment.