Skip to content

planner: Add optimizer risk variables #21339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4625,6 +4625,38 @@ SHOW WARNINGS;

</details>

### tidb_opt_risk_eq_skew_ratio <span class="version-mark">New in v9.0.0</span>

> **Warning:**
>
> The TiDB query optimizer uses this variable. Do not adjust this variable without guidance from TiDB support or engineering.

- Scope: SESSION | GLOBAL
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes
- Type: Float
- Range: `[0, 1]`
- Default value: `0`
- This variable controls the ratio of risk between the original predicate
selectivity estimate and the potential skew estimate for an equality predicate, when the
value is not found in TopN or histogram buckets.


### tidb_opt_risk_range_skew_ratio <span class="version-mark">New in v9.0.0</span>

> **Warning:**
>
> The TiDB query optimizer uses this variable. Do not adjust this variable without guidance from TiDB support or engineering.

- Scope: SESSION | GLOBAL
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes
- Type: Float
- Range: `[0, 1]`
- Default value: `0`
- This variable controls the ratio of risk between the original predicate
selectivity estimate and the potential skew estimate for a range predicate, when the
search range is found within a single histogram bucket or entirely outside the range
of all histogram buckets.

### tidb_opt_scan_factor

- Scope: SESSION | GLOBAL
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy