mirror of
https://github.com/MariaDB/server.git
synced 2025-11-22 17:44:29 +03:00
Made the optimizer switch for index condition pushdown set to 'on' by default.
This commit is contained in:
@@ -778,7 +778,7 @@ create table t1 (a int primary key,b int, c int, d int, e int, f int, g int, h
|
||||
insert into t1 values (1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1);
|
||||
explain select * from t1 where a > 0 and a < 50;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL # Using index condition
|
||||
drop table t1;
|
||||
create table t1 (id int NOT NULL,id2 int NOT NULL,id3 int NOT NULL,dummy1 char(30),primary key (id,id2),index index_id3 (id3)) engine=innodb;
|
||||
insert into t1 values (0,0,0,'ABCDEFGHIJ'),(2,2,2,'BCDEFGHIJK'),(1,1,1,'CDEFGHIJKL');
|
||||
@@ -1219,7 +1219,7 @@ count(*)
|
||||
623
|
||||
explain select * from t1 where c between 1 and 2500;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL # Using where
|
||||
1 SIMPLE t1 range c c 5 NULL # Using index condition
|
||||
update t1 set c=a;
|
||||
explain select * from t1 where c between 1 and 2500;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
@@ -1914,7 +1914,7 @@ qq
|
||||
*a *a*a *
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const # Using where
|
||||
1 SIMPLE t1 ref v,v_2 # 13 const # Using index condition
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
@@ -2090,7 +2090,7 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v v 303 const # Using where; Using index
|
||||
explain select * from t1 where v='a';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref v v 303 const # Using where
|
||||
1 SIMPLE t1 ref v v 303 const # Using index condition
|
||||
select v,count(*) from t1 group by v limit 10;
|
||||
v count(*)
|
||||
a 1
|
||||
|
||||
@@ -119,7 +119,7 @@ key PRIMARY
|
||||
key_len 4
|
||||
ref t2.a
|
||||
rows 1
|
||||
Extra Using where
|
||||
Extra Using index condition; Using where
|
||||
id 2
|
||||
select_type DERIVED
|
||||
table NULL
|
||||
@@ -323,7 +323,7 @@ key PRIMARY
|
||||
key_len 4
|
||||
ref t2.a
|
||||
rows 1
|
||||
Extra Using where
|
||||
Extra Using index condition; Using where
|
||||
id 2
|
||||
select_type DERIVED
|
||||
table NULL
|
||||
|
||||
@@ -2725,7 +2725,7 @@ WHERE t2.i = t1.pk AND t1.pk BETWEEN 0 AND 224
|
||||
HAVING f > 7
|
||||
ORDER BY f;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Using filesort
|
||||
1 SIMPLE t2 ref idx idx 5 test.t1.pk 1 Using index
|
||||
SELECT t1 .i AS f FROM t1, t2
|
||||
WHERE t2.i = t1.pk AND t1.pk BETWEEN 0 AND 224
|
||||
@@ -2757,7 +2757,7 @@ SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.pk = t2.a
|
||||
WHERE t1.pk >= 6 HAVING t1.a<> 0 AND t1.a <> 11
|
||||
ORDER BY t1.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using index condition; Using filesort
|
||||
1 SIMPLE t2 ref a a 5 test.t1.pk 1 Using index
|
||||
SELECT t1.a FROM t1 LEFT JOIN t2 ON t1.pk = t2.a
|
||||
WHERE t1.pk >= 6 HAVING t1.a<> 0 AND t1.a <> 11
|
||||
|
||||
Reference in New Issue
Block a user