diff --git a/system-variables.md b/system-variables.md index c6dbe3f5307f8..b9fdbabe39cb4 100644 --- a/system-variables.md +++ b/system-variables.md @@ -1106,10 +1106,10 @@ mysql> desc select count(distinct a) from test.t; ### tidb_opt_prefer_range_scan New in v5.0 -- Scope: SESSION +- Scope: SESSION | GLOBAL - Default value: `OFF` -- After you set the value of this variable to `1`, the optimizer always prefers index scans over full table scans. -- In the following example, before you enable `tidb_opt_prefer_range_scan`, the TiDB optimizer performs a full table scan. After you enable `tidb_opt_prefer_range_scan`, the optimizer selects an index scan. +- After you set the value of this variable to `ON`, the optimizer always prefers range scans over full table scans. +- In the following example, before you enable `tidb_opt_prefer_range_scan`, the TiDB optimizer performs a full table scan. After you enable `tidb_opt_prefer_range_scan`, the optimizer selects an index range scan. ```sql explain select * from t where age=5;