mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
[t:4324] Updates to MySQL tokudb.cluster tests
git-svn-id: file:///svn/mysql/tests/mysql-test@38884 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
9de56caa26
commit
8ea60cce47
12 changed files with 276 additions and 88 deletions
|
@ -4,7 +4,7 @@ create table t1(a int, b int, c int, d int, primary key(a), clustering key(b), k
|
|||
insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 60 600 6000
|
||||
|
@ -13,7 +13,7 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
4 40 400 4000
|
||||
|
@ -24,20 +24,20 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 80 800 8000
|
||||
9 90 900 9000
|
||||
explain select a from t1 where a > 8;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
|
||||
select a from t1 where a > 8;
|
||||
a
|
||||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
4 40
|
||||
|
@ -48,7 +48,7 @@ a b
|
|||
9 90
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 800
|
||||
|
@ -59,7 +59,7 @@ alter table t1 drop index bdca;
|
|||
alter table t1 drop primary key;
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 60 600 6000
|
||||
|
@ -69,7 +69,7 @@ a b c d
|
|||
10 10 10 10
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
4 40 400 4000
|
||||
|
@ -80,14 +80,14 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 80 800 8000
|
||||
9 90 900 9000
|
||||
explain select b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
|
||||
select b from t1 where b > 30;
|
||||
b
|
||||
40
|
||||
|
@ -98,7 +98,7 @@ b
|
|||
90
|
||||
explain select b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select c from t1 where c > 750;
|
||||
c
|
||||
800
|
||||
|
@ -107,7 +107,7 @@ alter table t1 add e varchar(20);
|
|||
alter table t1 add primary key (a);
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 5 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d e
|
||||
6 60 600 6000 NULL
|
||||
|
@ -117,7 +117,7 @@ a b c d e
|
|||
10 10 10 10 NULL
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d e
|
||||
4 40 400 4000 NULL
|
||||
|
@ -128,21 +128,21 @@ a b c d e
|
|||
9 90 900 9000 NULL
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d e
|
||||
8 80 800 8000 NULL
|
||||
9 90 900 9000 NULL
|
||||
explain select a from t1 where a > 8;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
|
||||
select a from t1 where a > 8;
|
||||
a
|
||||
9
|
||||
10
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
4 40
|
||||
|
@ -153,7 +153,7 @@ a b
|
|||
9 90
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 800
|
||||
|
@ -161,7 +161,7 @@ a c
|
|||
alter table t1 drop primary key;
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d e
|
||||
6 60 600 6000 NULL
|
||||
|
@ -171,7 +171,7 @@ a b c d e
|
|||
10 10 10 10 NULL
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d e
|
||||
4 40 400 4000 NULL
|
||||
|
@ -182,14 +182,14 @@ a b c d e
|
|||
9 90 900 9000 NULL
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d e
|
||||
8 80 800 8000 NULL
|
||||
9 90 900 9000 NULL
|
||||
explain select b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
|
||||
select b from t1 where b > 30;
|
||||
b
|
||||
40
|
||||
|
@ -200,7 +200,7 @@ b
|
|||
90
|
||||
explain select b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select c from t1 where c > 750;
|
||||
c
|
||||
800
|
||||
|
|
|
@ -4,7 +4,7 @@ create table t1(a int, b int, c int, d int, primary key(a), clustering key(b), k
|
|||
insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 60 600 6000
|
||||
|
@ -13,7 +13,7 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
4 40 400 4000
|
||||
|
@ -24,20 +24,20 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 80 800 8000
|
||||
9 90 900 9000
|
||||
explain select a from t1 where a > 8;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
|
||||
select a from t1 where a > 8;
|
||||
a
|
||||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
4 40
|
||||
|
@ -48,7 +48,7 @@ a b
|
|||
9 90
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 800
|
||||
|
@ -65,7 +65,7 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 60 600 6000
|
||||
|
@ -74,7 +74,7 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 4 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
6 60 600 6000
|
||||
|
@ -83,20 +83,20 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 80 800 8000
|
||||
9 90 900 9000
|
||||
explain select a from t1 where a > 8;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
|
||||
select a from t1 where a > 8;
|
||||
a
|
||||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 4 Using where; Using index
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
6 60
|
||||
|
@ -105,7 +105,7 @@ a b
|
|||
9 90
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 800
|
||||
|
@ -113,7 +113,7 @@ a c
|
|||
alter table t1 drop primary key;
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 60 600 6000
|
||||
|
@ -122,7 +122,7 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 4 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
6 60 600 6000
|
||||
|
@ -131,14 +131,14 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 80 800 8000
|
||||
9 90 900 9000
|
||||
explain select a from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 7 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select a from t1 where a > 5;
|
||||
a
|
||||
6
|
||||
|
@ -147,7 +147,7 @@ a
|
|||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 4 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
6 60
|
||||
|
@ -156,7 +156,7 @@ a b
|
|||
9 90
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 800
|
||||
|
@ -168,37 +168,37 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
9 90 900 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 1 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
9 90 900 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 1 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
9 90 900 9000
|
||||
explain select a from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select a from t1 where a > 5;
|
||||
a
|
||||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 1 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
9 90
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 1 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
9 900
|
||||
|
|
|
@ -26,7 +26,7 @@ a b c d
|
|||
8 80 800 8000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 8 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10 100 1000
|
||||
|
@ -49,7 +49,7 @@ a b c d
|
|||
7 70 700 7000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 7 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10 100 1000
|
||||
|
@ -67,7 +67,7 @@ a b c d
|
|||
3 30 300 3000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 3 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10 100 1000
|
||||
|
@ -100,7 +100,7 @@ a b c d
|
|||
3 30 300 3000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 8 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10 100 1000
|
||||
|
@ -119,7 +119,7 @@ a b c d
|
|||
3 30 300 3000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 3 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10 100 1000
|
||||
|
|
|
@ -4,23 +4,23 @@ create table t1(a int, b int, c int, d int, primary key(a), clustering key(b), k
|
|||
insert into t1 values (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6),(7,7,7,7),(8,8,8,8),(9,9,9,9);
|
||||
explain select * from t1 where b > 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 7 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
explain select * from t1 where c > 2;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL c NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
explain select * from t1 where a > 4;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 5 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
|
||||
explain select * from t1 where c > 7;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
explain select * from t1 where b > 7;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
explain select a from t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index b b 5 NULL 9 Using where; Using index
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
|
||||
explain select a from t1 where c > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 index c c 5 NULL 9 Using where; Using index
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where; Using index
|
||||
drop table t1;
|
||||
|
|
|
@ -4,7 +4,7 @@ create table t1(a int, b int, c int, d int, primary key(a), clustering key(b), k
|
|||
insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,4000),(5,50,500,5000),(6,60,600,6000),(7,70,700,7000),(8,80,800,8000),(9,90,900,9000);
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 60 600 6000
|
||||
|
@ -13,7 +13,7 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
4 40 400 4000
|
||||
|
@ -24,20 +24,20 @@ a b c d
|
|||
9 90 900 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 80 800 8000
|
||||
9 90 900 9000
|
||||
explain select a from t1 where a > 8;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
|
||||
select a from t1 where a > 8;
|
||||
a
|
||||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where; Using index
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
4 40
|
||||
|
@ -48,7 +48,7 @@ a b
|
|||
9 90
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 800
|
||||
|
@ -56,7 +56,7 @@ a c
|
|||
update t1 set c = c+5, b = b+5 where b>30;
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 4 Using where
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 65 605 6000
|
||||
|
@ -65,7 +65,7 @@ a b c d
|
|||
9 95 905 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
4 45 405 4000
|
||||
|
@ -76,20 +76,20 @@ a b c d
|
|||
9 95 905 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 85 805 8000
|
||||
9 95 905 9000
|
||||
explain select a from t1 where a > 8;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 1 Using where; Using index
|
||||
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL NULL; Using where; Using index
|
||||
select a from t1 where a > 8;
|
||||
a
|
||||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where; Using index
|
||||
1 SIMPLE t1 index b b 5 NULL NULL; Using where; Using index
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
4 45
|
||||
|
@ -100,7 +100,7 @@ a b
|
|||
9 95
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 805
|
||||
|
@ -108,7 +108,7 @@ a c
|
|||
alter table t1 drop primary key;
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 65 605 6000
|
||||
|
@ -117,7 +117,7 @@ a b c d
|
|||
9 95 905 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
4 45 405 4000
|
||||
|
@ -128,14 +128,14 @@ a b c d
|
|||
9 95 905 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 85 805 8000
|
||||
9 95 905 9000
|
||||
explain select a from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select a from t1 where a > 5;
|
||||
a
|
||||
6
|
||||
|
@ -144,7 +144,7 @@ a
|
|||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
4 45
|
||||
|
@ -155,7 +155,7 @@ a b
|
|||
9 95
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 805
|
||||
|
@ -174,7 +174,7 @@ a b c d
|
|||
9 100 910 9000
|
||||
explain select * from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select * from t1 where a > 5;
|
||||
a b c d
|
||||
6 70 610 6000
|
||||
|
@ -183,7 +183,7 @@ a b c d
|
|||
9 100 910 9000
|
||||
explain select * from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * from t1 where b > 30;
|
||||
a b c d
|
||||
4 50 410 4000
|
||||
|
@ -194,14 +194,14 @@ a b c d
|
|||
9 100 910 9000
|
||||
explain select * from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select * from t1 where c > 750;
|
||||
a b c d
|
||||
8 90 810 8000
|
||||
9 100 910 9000
|
||||
explain select a from t1 where a > 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL NULL; Using where
|
||||
select a from t1 where a > 5;
|
||||
a
|
||||
6
|
||||
|
@ -210,7 +210,7 @@ a
|
|||
9
|
||||
explain select a,b from t1 where b > 30;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 6 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select a,b from t1 where b > 30;
|
||||
a b
|
||||
4 50
|
||||
|
@ -221,7 +221,7 @@ a b
|
|||
9 100
|
||||
explain select a,b from t1 where c > 750;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range c c 5 NULL 2 Using where
|
||||
1 SIMPLE t1 range c c 5 NULL NULL; Using where
|
||||
select a,c from t1 where c > 750;
|
||||
a c
|
||||
8 810
|
||||
|
|
|
@ -27,7 +27,7 @@ a b c d
|
|||
9 90 900 19000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 9 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10 100 11000
|
||||
|
@ -53,7 +53,7 @@ a b c d
|
|||
10009 90 900 19000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 9 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
10001 10 100 11000
|
||||
|
@ -79,7 +79,7 @@ a b c d
|
|||
10009 10090 900 19000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 9 Using where
|
||||
1 SIMPLE t1 index b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
10001 10010 100 11000
|
||||
|
@ -119,7 +119,7 @@ a b c d
|
|||
9 90 900 19000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 9 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10 100 11000
|
||||
|
@ -145,7 +145,7 @@ a b c d
|
|||
9 10090 900 19000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 9 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10010 100 11000
|
||||
|
@ -172,7 +172,7 @@ a b c d
|
|||
9 10090 900 19000
|
||||
explain select * From t1 where b > 0;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 range b b 5 NULL 9 Using where
|
||||
1 SIMPLE t1 range b b 5 NULL NULL; Using where
|
||||
select * From t1 where b > 0;
|
||||
a b c d
|
||||
1 10010 100 11000
|
||||
|
|
|
@ -11,22 +11,36 @@ insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,
|
|||
|
||||
|
||||
#normal queries
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 8;
|
||||
select a from t1 where a > 8;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
|
@ -36,19 +50,30 @@ insert into t1 values (10,10,10,10);
|
|||
alter table t1 drop index bdca;
|
||||
|
||||
alter table t1 drop primary key;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select b from t1 where b > 30;
|
||||
select b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select b from t1 where c > 750;
|
||||
select c from t1 where c > 750;
|
||||
|
||||
|
@ -56,40 +81,63 @@ alter table t1 add e varchar(20);
|
|||
|
||||
alter table t1 add primary key (a);
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 8;
|
||||
select a from t1 where a > 8;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
|
||||
alter table t1 drop primary key;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select b from t1 where b > 30;
|
||||
select b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select b from t1 where c > 750;
|
||||
select c from t1 where c > 750;
|
||||
|
||||
|
|
|
@ -11,65 +11,105 @@ insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,
|
|||
|
||||
|
||||
#normal queries
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 8;
|
||||
select a from t1 where a > 8;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
delete from t1 where b>30 and b < 60;
|
||||
select * from t1;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 8;
|
||||
select a from t1 where a > 8;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
|
||||
alter table t1 drop primary key;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 5;
|
||||
select a from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
|
@ -78,22 +118,35 @@ delete from t1 where b > 10 and b < 90;
|
|||
select * from t1;
|
||||
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 5;
|
||||
select a from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
|
|
|
@ -13,18 +13,24 @@ select * from t1;
|
|||
#delete on non-index column
|
||||
delete from t1 where d > 8000;
|
||||
select * from t1;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
#delete on prim_key
|
||||
delete from t1 where a > 7;
|
||||
select * from t1;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
#delete on clustering key
|
||||
delete from t1 where b > 30;
|
||||
select * from t1;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
|
@ -39,12 +45,16 @@ select * from t1;
|
|||
#delete on non-index column
|
||||
delete from t1 where d > 8000;
|
||||
select * from t1;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
#delete on clustering key
|
||||
delete from t1 where b > 30;
|
||||
select * from t1;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
|
|
|
@ -9,15 +9,29 @@ create table t1(a int, b int, c int, d int, primary key(a), clustering key(b), k
|
|||
|
||||
insert into t1 values (1,1,1,1),(2,2,2,2),(3,3,3,3),(4,4,4,4),(5,5,5,5),(6,6,6,6),(7,7,7,7),(8,8,8,8),(9,9,9,9);
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 2;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 2;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 4;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 7;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 7;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where b > 0;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where c > 0;
|
||||
|
||||
drop table t1;
|
|
@ -11,64 +11,102 @@ insert into t1 values (1,10,100,1000),(2,20,200,2000),(3,30,300,3000),(4,40,400,
|
|||
|
||||
|
||||
#normal queries
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 8;
|
||||
select a from t1 where a > 8;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
update t1 set c = c+5, b = b+5 where b>30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 8;
|
||||
select a from t1 where a > 8;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
|
||||
alter table t1 drop primary key;
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 5;
|
||||
select a from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
|
@ -76,22 +114,35 @@ update t1 set c = c+5, b = b+5 where b>30;
|
|||
select * from t1;
|
||||
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where a > 5;
|
||||
select * from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where b > 30;
|
||||
select * from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * from t1 where c > 750;
|
||||
select * from t1 where c > 750;
|
||||
|
||||
#covering indexes
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a from t1 where a > 5;
|
||||
select a from t1 where a > 5;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where b > 30;
|
||||
select a,b from t1 where b > 30;
|
||||
|
||||
# ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select a,b from t1 where c > 750;
|
||||
select a,c from t1 where c > 750;
|
||||
|
||||
|
|
|
@ -13,18 +13,24 @@ select * from t1;
|
|||
#update non-index column
|
||||
update t1 set d=d+10000;
|
||||
select * from t1;
|
||||
#ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
#update prim_key
|
||||
update t1 set a=a+10000;
|
||||
select * from t1;
|
||||
#ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
#update clustering key
|
||||
update t1 set b=b+10000;
|
||||
select * from t1;
|
||||
#ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
|
@ -39,18 +45,24 @@ select * from t1;
|
|||
#update non-index column
|
||||
update t1 set d=d+10000;
|
||||
select * from t1;
|
||||
#ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
#update clustering key
|
||||
update t1 set b=b+10000;
|
||||
select * from t1;
|
||||
#ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
alter table t1 drop key b;
|
||||
alter table t1 add clustering key b(b);
|
||||
select * from t1;
|
||||
#ignore rows column
|
||||
--replace_column 9 NULL;
|
||||
explain select * From t1 where b > 0;
|
||||
select * From t1 where b > 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue