Skip to content
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
26 changes: 26 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4625,6 +4625,32 @@ 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add this? - Persists to cluster: Yes

Suggested change
- Applies to hint [SET_VAR](/optimizer-hints.md#set_varvar_namevar_value): Yes
- Persists to cluster: Yes
- 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

- 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