diff --git a/system-variables.md b/system-variables.md index 27d4fec816dbc..bc29a4008ab6c 100644 --- a/system-variables.md +++ b/system-variables.md @@ -4625,6 +4625,38 @@ SHOW WARNINGS; +### tidb_opt_risk_eq_skew_ratio New in v9.0.0 + +> **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 New in v9.0.0 + +> **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