Commit 74eb4fc9 authored by Varun Gupta's avatar Varun Gupta

MDEV-17484: New defaults for eq_range_index_dive_limit in 10.4

The default value for eq_range_index_dive_limit is set to 10
parent 923415ff
...@@ -1428,7 +1428,7 @@ encrypt-binlog FALSE ...@@ -1428,7 +1428,7 @@ encrypt-binlog FALSE
encrypt-tmp-disk-tables FALSE encrypt-tmp-disk-tables FALSE
encrypt-tmp-files FALSE encrypt-tmp-files FALSE
enforce-storage-engine (No default value) enforce-storage-engine (No default value)
eq-range-index-dive-limit 0 eq-range-index-dive-limit 10
event-scheduler OFF event-scheduler OFF
expensive-subquery-limit 100 expensive-subquery-limit 100
expire-logs-days 0 expire-logs-days 0
......
...@@ -1079,7 +1079,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE ...@@ -1079,7 +1079,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR (Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA'); (Name='Seattle' AND Country='USA');
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City index_merge Country,CountryPopulation,CountryName,CityName CountryName,CityName 38,35 NULL 28 Using sort_union(CountryName,CityName); Using where 1 SIMPLE City index_merge Country,CountryPopulation,CountryName,CityName CityName,CountryName 35,38 NULL 27 Using sort_union(CityName,CountryName); Using where
SELECT Name, Country, Population FROM City WHERE SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR (Name='Manila' AND Country='PHL') OR
(Name='Addis Abeba' AND Country='ETH') OR (Name='Addis Abeba' AND Country='ETH') OR
...@@ -1166,7 +1166,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE ...@@ -1166,7 +1166,7 @@ EXPLAIN SELECT Name, Country, Population FROM City WHERE
(Name='Samara' AND Country='RUS') OR (Name='Samara' AND Country='RUS') OR
(Name='Seattle' AND Country='USA'); (Name='Seattle' AND Country='USA');
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 29 Using index condition; Using where 1 SIMPLE City range Country,CountryPopulation,CountryName,CityName CountryName 38 NULL 27 Using index condition; Using where
SELECT Name, Country, Population FROM City WHERE SELECT Name, Country, Population FROM City WHERE
(Name='Manila' AND Country='PHL') OR (Name='Manila' AND Country='PHL') OR
(Name='Addis Abeba' AND Country='ETH') OR (Name='Addis Abeba' AND Country='ETH') OR
...@@ -1922,6 +1922,6 @@ Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR ...@@ -1922,6 +1922,6 @@ Country='POL' AND Name IN ('Warszawa', 'Wroclaw') OR
Country='NOR' AND Name IN ('Oslo', 'Bergen') OR Country='NOR' AND Name IN ('Oslo', 'Bergen') OR
Country='ITA' AND Name IN ('Napoli', 'Venezia'); Country='ITA' AND Name IN ('Napoli', 'Venezia');
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE City range CountryName,Name CountryName 38 NULL 22 Using index condition; Using where 1 SIMPLE City range CountryName,Name CountryName 38 NULL 20 Using index condition; Using where
DROP DATABASE world; DROP DATABASE world;
set session optimizer_switch='index_merge_sort_intersection=default'; set session optimizer_switch='index_merge_sort_intersection=default';
...@@ -881,10 +881,10 @@ ENUM_VALUE_LIST NULL ...@@ -881,10 +881,10 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT
SESSION_VALUE 0 SESSION_VALUE 10
GLOBAL_VALUE 0 GLOBAL_VALUE 10
GLOBAL_VALUE_ORIGIN COMPILE-TIME GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0 DEFAULT_VALUE 10
VARIABLE_SCOPE SESSION VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used. VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used.
......
...@@ -895,10 +895,10 @@ ENUM_VALUE_LIST NULL ...@@ -895,10 +895,10 @@ ENUM_VALUE_LIST NULL
READ_ONLY NO READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT VARIABLE_NAME EQ_RANGE_INDEX_DIVE_LIMIT
SESSION_VALUE 0 SESSION_VALUE 10
GLOBAL_VALUE 0 GLOBAL_VALUE 10
GLOBAL_VALUE_ORIGIN COMPILE-TIME GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE 0 DEFAULT_VALUE 10
VARIABLE_SCOPE SESSION VARIABLE_SCOPE SESSION
VARIABLE_TYPE INT UNSIGNED VARIABLE_TYPE INT UNSIGNED
VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used. VARIABLE_COMMENT The optimizer will use existing index statistics instead of doing index dives for equality ranges if the number of equality ranges for the index is larger than or equal to this number. If set to 0, index dives are always used.
......
...@@ -2702,7 +2702,7 @@ static Sys_var_uint Sys_eq_range_index_dive_limit( ...@@ -2702,7 +2702,7 @@ static Sys_var_uint Sys_eq_range_index_dive_limit(
"ranges for the index is larger than or equal to this number. " "ranges for the index is larger than or equal to this number. "
"If set to 0, index dives are always used.", "If set to 0, index dives are always used.",
SESSION_VAR(eq_range_index_dive_limit), CMD_LINE(REQUIRED_ARG), SESSION_VAR(eq_range_index_dive_limit), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, UINT_MAX32), DEFAULT(0), VALID_RANGE(0, UINT_MAX32), DEFAULT(10),
BLOCK_SIZE(1)); BLOCK_SIZE(1));
static Sys_var_ulong Sys_range_alloc_block_size( static Sys_var_ulong Sys_range_alloc_block_size(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment