From 5b8fdb3f748d4b472a48843bdb2b0563879df1cb Mon Sep 17 00:00:00 2001 From: en-jin19 Date: Mon, 6 Sep 2021 10:42:32 +0200 Subject: [PATCH] sysvar: update doc for tidb_opt_prefer_range_scan --- system-variables.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;