Skip to content

Commit 8fffd9b

Browse files
optimizer-fix-controls: Add optimizer fix control 47400 for controlling zero estRows (#18587)
1 parent c4e87a7 commit 8fffd9b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

optimizer-fix-controls.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ SET SESSION tidb_opt_fix_control = '44262:ON,44389:ON';
7171
- 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`.
7272
- `0` means to disable this heuristic strategy.
7373

74+
### [`47400`](https://github.com/pingcap/tidb/issues/47400) <span class="version-mark">New in v8.4.0</span>
75+
76+
- Default value: `ON`
77+
- Possible values: `ON`, `OFF`
78+
- 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`.
79+
- `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.
80+
- `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.
81+
7482
### [`52592`](https://github.com/pingcap/tidb/issues/52592) <span class="version-mark">New in v8.4.0</span>
7583

7684
- Default value: `OFF`

0 commit comments

Comments
 (0)