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
13 changes: 13 additions & 0 deletions system-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -4861,6 +4861,19 @@ SHOW WARNINGS;

</details>

### tidb_opt_group_ndv_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 between naive estimation and exponential backoff estimation for group NDV (Number of Distinct Values). When set to `0`, it uses naive estimation. When set to `1`, it uses exponential backoff estimation. Values between `0` and `1` provide a weighted combination of both estimation methods.

Choose a reason for hiding this comment

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

low

For better readability and conciseness, you can combine the description of this variable into a single sentence. This avoids repeating "estimation" and "When set to".1

Suggested change
- This variable controls the ratio between naive estimation and exponential backoff estimation for group NDV (Number of Distinct Values). When set to `0`, it uses naive estimation. When set to `1`, it uses exponential backoff estimation. Values between `0` and `1` provide a weighted combination of both estimation methods.
- This variable controls the ratio between naive estimation and exponential backoff for group NDV (Number of Distinct Values): `0` for naive estimation, `1` for exponential backoff, and values in between for a weighted combination of both.

Style Guide References

Footnotes

  1. The style guide recommends avoiding unnecessary words and repetition. (link)


### tidb_opt_scan_factor

- Scope: SESSION | GLOBAL
Expand Down