mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
fixing EXPLAIN select types
This commit is contained in:
@ -173,9 +173,9 @@ INSERT INTO t2 values (1),(2),(3);
|
||||
INSERT INTO t3 VALUES (1,'1'),(2,'2'),(1,'1'),(2,'2');
|
||||
explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 FIRST t3 index a a 5 NULL 6 Using index; Using temporary
|
||||
1 FIRST t2 index a a 4 NULL 5 Using index; Distinct
|
||||
1 FIRST t1 eq_ref PRIMARY PRIMARY 4 t2.a 1 where used; Distinct
|
||||
1 SIMPLE t3 index a a 5 NULL 6 Using index; Using temporary
|
||||
1 SIMPLE t2 index a a 4 NULL 5 Using index; Distinct
|
||||
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 t2.a 1 where used; Distinct
|
||||
SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
|
||||
a
|
||||
1
|
||||
@ -189,8 +189,8 @@ insert into t4 select * from t3;
|
||||
insert into t3 select * from t4;
|
||||
explain select distinct t1.a from t1,t3 where t1.a=t3.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 FIRST t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary
|
||||
1 FIRST t3 ref a a 5 t1.a 10 Using index; Distinct
|
||||
1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index; Using temporary
|
||||
1 SIMPLE t3 ref a a 5 t1.a 10 Using index; Distinct
|
||||
select distinct t1.a from t1,t3 where t1.a=t3.a;
|
||||
a
|
||||
1
|
||||
@ -275,13 +275,13 @@ WHERE
|
||||
((t1.id=j_lj_t2.id AND t2_lj.id IS NULL) OR (t1.id=t2.id AND t2.idx=2))
|
||||
AND ((t1.id=j_lj_t3.id AND t3_lj.id IS NULL) OR (t1.id=t3.id AND t3.idx=2));
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 FIRST t1 index id id 4 NULL 2 Using index; Using temporary
|
||||
1 FIRST t2 index id id 8 NULL 1 Using index; Distinct
|
||||
1 FIRST t3 index id id 8 NULL 1 Using index; Distinct
|
||||
1 FIRST j_lj_t2 index id id 4 NULL 2 where used; Using index; Distinct
|
||||
1 FIRST t2_lj index id id 8 NULL 1 where used; Using index; Distinct
|
||||
1 FIRST j_lj_t3 index id id 4 NULL 2 where used; Using index; Distinct
|
||||
1 FIRST t3_lj index id id 8 NULL 1 where used; Using index; Distinct
|
||||
1 SIMPLE t1 index id id 4 NULL 2 Using index; Using temporary
|
||||
1 SIMPLE t2 index id id 8 NULL 1 Using index; Distinct
|
||||
1 SIMPLE t3 index id id 8 NULL 1 Using index; Distinct
|
||||
1 SIMPLE j_lj_t2 index id id 4 NULL 2 where used; Using index; Distinct
|
||||
1 SIMPLE t2_lj index id id 8 NULL 1 where used; Using index; Distinct
|
||||
1 SIMPLE j_lj_t3 index id id 4 NULL 2 where used; Using index; Distinct
|
||||
1 SIMPLE t3_lj index id id 8 NULL 1 where used; Using index; Distinct
|
||||
SELECT DISTINCT
|
||||
t1.id
|
||||
from
|
||||
|
Reference in New Issue
Block a user