1
create table t1 (a int primary key);
2
insert into t1 values (1),(2),(3),(4),(100),(200);
3
explain select * from t1 order by a;
4
select * from t1 order by a;
5
explain select * from t1 where a>4;
6
select * from t1 where a>4;
7
explain select * from t1 where a<4;
8
select * from t1 where a<4;
9
explain select * from t1 where a=4;
10
select * from t1 where a=4;
13
create table t1 (a int primary key, b varchar(100));
14
insert into t1 values (1, "hello"), (2, "world"), (3, "Beaker"), (4, "Cricket");
15
EXPLAIN SELECT b FROM t1 WHERE a=1;
16
SELECT b FROM t1 WHERE a=1;
17
EXPLAIN SELECT b FROM t1 WHERE a=2;
18
SELECT b FROM t1 WHERE a=2;
19
EXPLAIN SELECT b FROM t1 WHERE a=3;
20
SELECT b FROM t1 WHERE a=3;
21
EXPLAIN SELECT b FROM t1 WHERE a=4;
22
SELECT b FROM t1 WHERE a=4;