|
|
|
@ -74,6 +74,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 0
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 0
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 0
|
|
|
|
@ -86,6 +87,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 0
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 0
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 0
|
|
|
|
@ -157,6 +159,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 0
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 0
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 0
|
|
|
|
@ -169,6 +172,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 0
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 0
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 0
|
|
|
|
@ -219,6 +223,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 0
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 0
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 0
|
|
|
|
@ -233,6 +238,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 11
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 3
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 11
|
|
|
|
@ -306,6 +312,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 22
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 22
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 0
|
|
|
|
@ -321,6 +328,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 0
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 0
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 0
|
|
|
|
@ -335,6 +343,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 11
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 3
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 11
|
|
|
|
@ -414,7 +423,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
5 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
|
|
|
|
|
3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11`,`tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` join (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` where ((`tt`.`f1` = `tt`.`f1`) and (`tt`.`f1` > 2) and (`tt`.`f1` > 2))
|
|
|
|
|
Note 1003 select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11`,`tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` join (select `t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` where (`t1`.`f1` < 7) group by `t1`.`f1`) `tt` where ((`tt`.`f1` = `tt`.`f1`) and (`tt`.`f1` > 2) and (`tt`.`f1` > 2))
|
|
|
|
|
flush status;
|
|
|
|
|
select * from
|
|
|
|
|
(select * from (select * from t1 where f1 < 7 group by f1) tt where f1 > 2) x
|
|
|
|
@ -428,6 +437,7 @@ show status like 'Handler_read%';
|
|
|
|
|
Variable_name Value
|
|
|
|
|
Handler_read_first 0
|
|
|
|
|
Handler_read_key 2
|
|
|
|
|
Handler_read_last 0
|
|
|
|
|
Handler_read_next 2
|
|
|
|
|
Handler_read_prev 0
|
|
|
|
|
Handler_read_rnd 8
|
|
|
|
@ -445,7 +455,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 11 100.00 Using where
|
|
|
|
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using join buffer (flat, BNL join)
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11`,`test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` join `test`.`t1` where ((`test`.`t1`.`f1` = `test`.`t1`.`f1`) and (`test`.`t1`.`f1` > 2) and (`test`.`t1`.`f1` < 7) and (`test`.`t1`.`f1` > 2) and (`test`.`t1`.`f1` < 7))
|
|
|
|
|
Note 1003 select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11`,`t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` join `test`.`t1` where ((`t1`.`f1` = `test`.`t1`.`f1`) and (`test`.`t1`.`f1` > 2) and (`test`.`t1`.`f1` < 7) and (`test`.`t1`.`f1` > 2) and (`test`.`t1`.`f1` < 7))
|
|
|
|
|
select * from
|
|
|
|
|
(select * from
|
|
|
|
|
(select * from t1 where f1 < 7 ) tt where f1 > 2 ) x
|
|
|
|
@ -473,7 +483,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
2 DERIVED <derived3> ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
|
|
|
|
|
3 DERIVED t1 ALL NULL NULL NULL NULL 11 100.00 Using where; Using temporary; Using filesort
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1003 select `x`.`f1` AS `f1`,`x`.`f11` AS `f11`,`z`.`f1` AS `f1`,`z`.`f11` AS `f11` from (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `x` join (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `z` where (`z`.`f1` = `x`.`f1`)
|
|
|
|
|
Note 1003 select `x`.`f1` AS `f1`,`x`.`f11` AS `f11`,`z`.`f1` AS `f1`,`z`.`f11` AS `f11` from (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `test`.`t1`.`f1` AS `f1`,`test`.`t1`.`f11` AS `f11` from `test`.`t1` where (`test`.`t1`.`f1` < 7) group by `test`.`t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `x` join (select `tt`.`f1` AS `f1`,`tt`.`f11` AS `f11` from (select `t1`.`f1` AS `f1`,`t1`.`f11` AS `f11` from `test`.`t1` where (`t1`.`f1` < 7) group by `t1`.`f1`) `tt` where (`tt`.`f1` > 2) group by `tt`.`f1`) `z` where (`z`.`f1` = `x`.`f1`)
|
|
|
|
|
select * from
|
|
|
|
|
(select * from
|
|
|
|
|
(select * from t1 where f1 < 7 group by f1) tt where f1 > 2 group by f1) x
|
|
|
|
@ -990,7 +1000,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
|
|
|
|
3 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1 100.00
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t1` left join `test`.`t2` on((0 <> 0)) where <in_optimizer>(0,<exists>(select 0 from `test`.`t1` where (<cache>(0) = 0)))
|
|
|
|
|
Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <in_optimizer>(0,<exists>(select 0 from dual where (<cache>(0) = 0)))
|
|
|
|
|
SELECT * FROM t2 RIGHT JOIN v1 AS t ON t.a != 0
|
|
|
|
|
WHERE t.a IN (SELECT b FROM t1);
|
|
|
|
|
a a b
|
|
|
|
@ -1003,7 +1013,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
|
|
|
|
2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1 100.00
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t1` left join `test`.`t2` on((0 <> 0)) where <in_optimizer>(0,<exists>(select 0 from `test`.`t1` where (<cache>(0) = 0)))
|
|
|
|
|
Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <in_optimizer>(0,<exists>(select 0 from dual where (<cache>(0) = 0)))
|
|
|
|
|
DROP VIEW v1;
|
|
|
|
|
DROP TABLE t1,t2;
|
|
|
|
|
#
|
|
|
|
@ -1075,7 +1085,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
1 PRIMARY t3 system NULL NULL NULL NULL 1 100.00
|
|
|
|
|
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1003 select 6 AS `a`,5 AS `b` from `test`.`t1` `t` join `test`.`t2` left join `test`.`t3` on((0 <> 0)) where (not(<in_optimizer>((6,5),<exists>(select 7,5 having (trigcond(((<cache>(6) = 7) or isnull(7))) and trigcond(((<cache>(5) = 5) or isnull(5))) and trigcond(<is_not_null_test>(7)) and trigcond(<is_not_null_test>(5)))))))
|
|
|
|
|
Note 1003 select 6 AS `a`,5 AS `b` from `test`.`t3` where (not(<in_optimizer>((6,5),<exists>(select 7,5 having (trigcond(((<cache>(6) = 7) or isnull(7))) and trigcond(((<cache>(5) = 5) or isnull(5))) and trigcond(<is_not_null_test>(7)) and trigcond(<is_not_null_test>(5)))))))
|
|
|
|
|
SELECT t.a,t.b FROM t3 RIGHT JOIN ((SELECT * FROM t1) AS t, t2) ON t2.b != 0
|
|
|
|
|
WHERE (t.a,t.b) NOT IN (SELECT 7, 5);
|
|
|
|
|
a b
|
|
|
|
@ -1089,7 +1099,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
1 PRIMARY t3 system NULL NULL NULL NULL 1 100.00
|
|
|
|
|
3 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1003 select 6 AS `a`,5 AS `b` from `test`.`t1` join `test`.`t2` left join `test`.`t3` on((0 <> 0)) where (not(<in_optimizer>((6,5),<exists>(select 7,5 having (trigcond(((<cache>(6) = 7) or isnull(7))) and trigcond(((<cache>(5) = 5) or isnull(5))) and trigcond(<is_not_null_test>(7)) and trigcond(<is_not_null_test>(5)))))))
|
|
|
|
|
Note 1003 select 6 AS `a`,5 AS `b` from `test`.`t3` where (not(<in_optimizer>((6,5),<exists>(select 7,5 having (trigcond(((<cache>(6) = 7) or isnull(7))) and trigcond(((<cache>(5) = 5) or isnull(5))) and trigcond(<is_not_null_test>(7)) and trigcond(<is_not_null_test>(5)))))))
|
|
|
|
|
SELECT t.a,t.b FROM t3 RIGHT JOIN (v1 AS t, t2) ON t2.b != 0
|
|
|
|
|
WHERE (t.a,t.b) NOT IN (SELECT 7, 5);
|
|
|
|
|
a b
|
|
|
|
@ -1103,7 +1113,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
1 PRIMARY t3 system NULL NULL NULL NULL 1 100.00
|
|
|
|
|
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1003 select 6 AS `a`,5 AS `b` from `test`.`t1` join `test`.`t2` left join `test`.`t3` on((0 <> 0)) where (not(<in_optimizer>((6,5),<exists>(select 7,5 having (trigcond(((<cache>(6) = 7) or isnull(7))) and trigcond(((<cache>(5) = 5) or isnull(5))) and trigcond(<is_not_null_test>(7)) and trigcond(<is_not_null_test>(5)))))))
|
|
|
|
|
Note 1003 select 6 AS `a`,5 AS `b` from `test`.`t3` where (not(<in_optimizer>((6,5),<exists>(select 7,5 having (trigcond(((<cache>(6) = 7) or isnull(7))) and trigcond(((<cache>(5) = 5) or isnull(5))) and trigcond(<is_not_null_test>(7)) and trigcond(<is_not_null_test>(5)))))))
|
|
|
|
|
DROP VIEW v1;
|
|
|
|
|
DROP TABLE t1,t2,t3;
|
|
|
|
|
#
|
|
|
|
@ -1262,7 +1272,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|
|
|
|
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
|
|
|
|
Warnings:
|
|
|
|
|
Note 1276 Field or reference 't.a' of SELECT #3 was resolved in SELECT #1
|
|
|
|
|
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where exists(select 28 from `test`.`t2` left join `test`.`t3` on((`test`.`t3`.`a` = 28)) where ('j' < `test`.`t1`.`a`))
|
|
|
|
|
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where exists(select 28 from `test`.`t3` where ('j' < `test`.`t1`.`a`))
|
|
|
|
|
SELECT * FROM (SELECT * FROM t1) AS t
|
|
|
|
|
WHERE EXISTS (SELECT t2.a FROM t3 RIGHT JOIN t2 ON (t3.a = t2.a)
|
|
|
|
|
WHERE t2.b < t.a);
|
|
|
|
|