76
76
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
77
77
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
79
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where ((`test`.`t3`.`a` = 1) or isnull(`test`.`t3`.`c`))
79
Note 1003 select "test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b" from "test"."t2" left join ("test"."t3" join "test"."t4") on(("test"."t4"."b" = "test"."t2"."b")) where (("test"."t3"."a" = 1) or isnull("test"."t3"."c"))
80
80
SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
153
153
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
154
154
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00
156
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4` join `test`.`t5`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where ((`test`.`t3`.`a` > 1) or isnull(`test`.`t3`.`c`))
156
Note 1003 select "test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b","test"."t5"."a" AS "a","test"."t5"."b" AS "b" from "test"."t2" left join ("test"."t3" join "test"."t4" join "test"."t5") on(("test"."t4"."b" = "test"."t2"."b")) where (("test"."t3"."a" > 1) or isnull("test"."t3"."c"))
157
157
SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,t5.a,t5.b
183
183
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
184
184
1 SIMPLE t5 ALL NULL NULL NULL NULL 3 100.00 Using where
186
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b` from `test`.`t2` left join (`test`.`t3` join `test`.`t4` join `test`.`t5`) on((`test`.`t4`.`b` = `test`.`t2`.`b`)) where (((`test`.`t3`.`a` > 1) or isnull(`test`.`t3`.`c`)) and ((`test`.`t5`.`a` < 3) or isnull(`test`.`t5`.`c`)))
186
Note 1003 select "test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b","test"."t5"."a" AS "a","test"."t5"."b" AS "b" from "test"."t2" left join ("test"."t3" join "test"."t4" join "test"."t5") on(("test"."t4"."b" = "test"."t2"."b")) where ((("test"."t3"."a" > 1) or isnull("test"."t3"."c")) and (("test"."t5"."a" < 3) or isnull("test"."t5"."c")))
187
187
SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,t5.a,t5.b
232
232
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using join buffer
233
233
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00
235
Note 1003 select `test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t7`.`b` = `test`.`t8`.`b`) and (`test`.`t6`.`b` < 10))) where 1
235
Note 1003 select "test"."t6"."a" AS "a","test"."t6"."b" AS "b","test"."t7"."a" AS "a","test"."t7"."b" AS "b","test"."t8"."a" AS "a","test"."t8"."b" AS "b" from "test"."t6" join "test"."t7" left join "test"."t8" on((("test"."t7"."b" = "test"."t8"."b") and ("test"."t6"."b" < 10))) where 1
236
236
SELECT t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
553
553
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00
554
554
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00
556
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) where ((`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)))
556
Note 1003 select "test"."t0"."a" AS "a","test"."t0"."b" AS "b","test"."t1"."a" AS "a","test"."t1"."b" AS "b","test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b","test"."t5"."a" AS "a","test"."t5"."b" AS "b","test"."t6"."a" AS "a","test"."t6"."b" AS "b","test"."t7"."a" AS "a","test"."t7"."b" AS "b","test"."t8"."a" AS "a","test"."t8"."b" AS "b" from "test"."t0" join "test"."t1" left join ("test"."t2" left join ("test"."t3" join "test"."t4") on((("test"."t4"."b" = "test"."t2"."b") and ("test"."t3"."a" = 1))) join "test"."t5" left join ("test"."t6" join "test"."t7" left join "test"."t8" on((("test"."t8"."b" = "test"."t5"."b") and ("test"."t6"."b" < 10)))) on((("test"."t7"."b" = "test"."t5"."b") and ("test"."t6"."b" >= 2)))) on(((("test"."t3"."b" = 2) or isnull("test"."t3"."c")) and (("test"."t6"."b" = 2) or isnull("test"."t6"."c")) and (("test"."t5"."b" = "test"."t0"."b") or isnull("test"."t3"."c") or isnull("test"."t6"."c") or isnull("test"."t8"."c")) and ("test"."t1"."a" <> 2))) where (("test"."t1"."b" = "test"."t0"."b") and ("test"."t0"."a" = 1) and (("test"."t2"."a" >= 4) or isnull("test"."t2"."c")))
557
557
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
558
558
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b
649
649
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
650
650
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
652
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
652
Note 1003 select "test"."t0"."a" AS "a","test"."t0"."b" AS "b","test"."t1"."a" AS "a","test"."t1"."b" AS "b","test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b","test"."t5"."a" AS "a","test"."t5"."b" AS "b","test"."t6"."a" AS "a","test"."t6"."b" AS "b","test"."t7"."a" AS "a","test"."t7"."b" AS "b","test"."t8"."a" AS "a","test"."t8"."b" AS "b","test"."t9"."a" AS "a","test"."t9"."b" AS "b" from "test"."t0" join "test"."t1" left join ("test"."t2" left join ("test"."t3" join "test"."t4") on((("test"."t4"."b" = "test"."t2"."b") and ("test"."t3"."a" = 1))) join "test"."t5" left join ("test"."t6" join "test"."t7" left join "test"."t8" on((("test"."t8"."b" = "test"."t5"."b") and ("test"."t6"."b" < 10)))) on((("test"."t7"."b" = "test"."t5"."b") and ("test"."t6"."b" >= 2)))) on(((("test"."t3"."b" = 2) or isnull("test"."t3"."c")) and (("test"."t6"."b" = 2) or isnull("test"."t6"."c")) and (("test"."t5"."b" = "test"."t0"."b") or isnull("test"."t3"."c") or isnull("test"."t6"."c") or isnull("test"."t8"."c")) and ("test"."t1"."a" <> 2))) join "test"."t9" where (("test"."t9"."a" = 1) and ("test"."t1"."b" = "test"."t0"."b") and ("test"."t0"."a" = 1) and (("test"."t2"."a" >= 4) or isnull("test"."t2"."c")) and (("test"."t3"."a" < 5) or isnull("test"."t3"."c")) and (("test"."t4"."b" = "test"."t3"."b") or isnull("test"."t3"."c") or isnull("test"."t4"."c")) and (("test"."t5"."a" >= 2) or isnull("test"."t5"."c")) and (("test"."t6"."a" >= 4) or isnull("test"."t6"."c")) and (("test"."t7"."a" <= 2) or isnull("test"."t7"."c")) and (("test"."t8"."a" < 1) or isnull("test"."t8"."c")) and (("test"."t9"."b" = "test"."t8"."b") or isnull("test"."t8"."c")))
840
840
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
841
841
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00
843
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t1` join `test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) where (`test`.`t1`.`a` <= 2)
843
Note 1003 select "test"."t1"."a" AS "a","test"."t1"."b" AS "b","test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b" from "test"."t1" join "test"."t2" left join ("test"."t3" join "test"."t4") on((("test"."t4"."b" = "test"."t2"."b") and ("test"."t3"."a" = 1))) where ("test"."t1"."a" <= 2)
844
844
CREATE INDEX idx_b ON t2(b);
846
846
SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
854
854
1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 1 100.00
855
855
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
857
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1
857
Note 1003 select "test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b" from "test"."t3" join "test"."t4" left join ("test"."t1" join "test"."t2") on((("test"."t3"."a" = 1) and ("test"."t3"."b" = "test"."t2"."b") and ("test"."t2"."b" = "test"."t4"."b"))) where 1
858
858
SELECT t2.a,t2.b,t3.a,t3.b,t4.a,t4.b
916
916
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
917
917
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
919
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
919
Note 1003 select "test"."t0"."a" AS "a","test"."t0"."b" AS "b","test"."t1"."a" AS "a","test"."t1"."b" AS "b","test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b","test"."t5"."a" AS "a","test"."t5"."b" AS "b","test"."t6"."a" AS "a","test"."t6"."b" AS "b","test"."t7"."a" AS "a","test"."t7"."b" AS "b","test"."t8"."a" AS "a","test"."t8"."b" AS "b","test"."t9"."a" AS "a","test"."t9"."b" AS "b" from "test"."t0" join "test"."t1" left join ("test"."t2" left join ("test"."t3" join "test"."t4") on((("test"."t4"."b" = "test"."t2"."b") and ("test"."t3"."a" = 1))) join "test"."t5" left join ("test"."t6" join "test"."t7" left join "test"."t8" on((("test"."t8"."b" = "test"."t5"."b") and ("test"."t6"."b" < 10)))) on((("test"."t7"."b" = "test"."t5"."b") and ("test"."t6"."b" >= 2)))) on(((("test"."t3"."b" = 2) or isnull("test"."t3"."c")) and (("test"."t6"."b" = 2) or isnull("test"."t6"."c")) and (("test"."t5"."b" = "test"."t0"."b") or isnull("test"."t3"."c") or isnull("test"."t6"."c") or isnull("test"."t8"."c")) and ("test"."t1"."a" <> 2))) join "test"."t9" where (("test"."t9"."a" = 1) and ("test"."t1"."b" = "test"."t0"."b") and ("test"."t0"."a" = 1) and (("test"."t2"."a" >= 4) or isnull("test"."t2"."c")) and (("test"."t3"."a" < 5) or isnull("test"."t3"."c")) and (("test"."t4"."b" = "test"."t3"."b") or isnull("test"."t3"."c") or isnull("test"."t4"."c")) and (("test"."t5"."a" >= 2) or isnull("test"."t5"."c")) and (("test"."t6"."a" >= 4) or isnull("test"."t6"."c")) and (("test"."t7"."a" <= 2) or isnull("test"."t7"."c")) and (("test"."t8"."a" < 1) or isnull("test"."t8"."c")) and (("test"."t9"."b" = "test"."t8"."b") or isnull("test"."t8"."c")))
920
920
CREATE INDEX idx_b ON t4(b);
921
921
CREATE INDEX idx_b ON t5(b);
966
966
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
967
967
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
969
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t3`.`b` = `test`.`t4`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
969
Note 1003 select "test"."t0"."a" AS "a","test"."t0"."b" AS "b","test"."t1"."a" AS "a","test"."t1"."b" AS "b","test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b","test"."t5"."a" AS "a","test"."t5"."b" AS "b","test"."t6"."a" AS "a","test"."t6"."b" AS "b","test"."t7"."a" AS "a","test"."t7"."b" AS "b","test"."t8"."a" AS "a","test"."t8"."b" AS "b","test"."t9"."a" AS "a","test"."t9"."b" AS "b" from "test"."t0" join "test"."t1" left join ("test"."t2" left join ("test"."t3" join "test"."t4") on((("test"."t4"."b" = "test"."t2"."b") and ("test"."t3"."a" = 1))) join "test"."t5" left join ("test"."t6" join "test"."t7" left join "test"."t8" on((("test"."t8"."b" = "test"."t5"."b") and ("test"."t6"."b" < 10)))) on((("test"."t7"."b" = "test"."t5"."b") and ("test"."t6"."b" >= 2)))) on(((("test"."t3"."b" = 2) or isnull("test"."t3"."c")) and (("test"."t6"."b" = 2) or isnull("test"."t6"."c")) and (("test"."t5"."b" = "test"."t0"."b") or isnull("test"."t3"."c") or isnull("test"."t6"."c") or isnull("test"."t8"."c")) and ("test"."t1"."a" <> 2))) join "test"."t9" where (("test"."t9"."a" = 1) and ("test"."t1"."b" = "test"."t0"."b") and ("test"."t0"."a" = 1) and (("test"."t2"."a" >= 4) or isnull("test"."t2"."c")) and (("test"."t3"."a" < 5) or isnull("test"."t3"."c")) and (("test"."t3"."b" = "test"."t4"."b") or isnull("test"."t3"."c") or isnull("test"."t4"."c")) and (("test"."t5"."a" >= 2) or isnull("test"."t5"."c")) and (("test"."t6"."a" >= 4) or isnull("test"."t6"."c")) and (("test"."t7"."a" <= 2) or isnull("test"."t7"."c")) and (("test"."t8"."a" < 1) or isnull("test"."t8"."c")) and (("test"."t9"."b" = "test"."t8"."b") or isnull("test"."t8"."c")))
970
970
CREATE INDEX idx_b ON t8(b);
972
972
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
1015
1015
1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
1016
1016
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1018
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t3`.`b` = `test`.`t4`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
1018
Note 1003 select "test"."t0"."a" AS "a","test"."t0"."b" AS "b","test"."t1"."a" AS "a","test"."t1"."b" AS "b","test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b","test"."t5"."a" AS "a","test"."t5"."b" AS "b","test"."t6"."a" AS "a","test"."t6"."b" AS "b","test"."t7"."a" AS "a","test"."t7"."b" AS "b","test"."t8"."a" AS "a","test"."t8"."b" AS "b","test"."t9"."a" AS "a","test"."t9"."b" AS "b" from "test"."t0" join "test"."t1" left join ("test"."t2" left join ("test"."t3" join "test"."t4") on((("test"."t4"."b" = "test"."t2"."b") and ("test"."t3"."a" = 1))) join "test"."t5" left join ("test"."t6" join "test"."t7" left join "test"."t8" on((("test"."t8"."b" = "test"."t5"."b") and ("test"."t6"."b" < 10)))) on((("test"."t7"."b" = "test"."t5"."b") and ("test"."t6"."b" >= 2)))) on(((("test"."t3"."b" = 2) or isnull("test"."t3"."c")) and (("test"."t6"."b" = 2) or isnull("test"."t6"."c")) and (("test"."t5"."b" = "test"."t0"."b") or isnull("test"."t3"."c") or isnull("test"."t6"."c") or isnull("test"."t8"."c")) and ("test"."t1"."a" <> 2))) join "test"."t9" where (("test"."t9"."a" = 1) and ("test"."t1"."b" = "test"."t0"."b") and ("test"."t0"."a" = 1) and (("test"."t2"."a" >= 4) or isnull("test"."t2"."c")) and (("test"."t3"."a" < 5) or isnull("test"."t3"."c")) and (("test"."t3"."b" = "test"."t4"."b") or isnull("test"."t3"."c") or isnull("test"."t4"."c")) and (("test"."t5"."a" >= 2) or isnull("test"."t5"."c")) and (("test"."t6"."a" >= 4) or isnull("test"."t6"."c")) and (("test"."t7"."a" <= 2) or isnull("test"."t7"."c")) and (("test"."t8"."a" < 1) or isnull("test"."t8"."c")) and (("test"."t9"."b" = "test"."t8"."b") or isnull("test"."t8"."c")))
1019
1019
CREATE INDEX idx_b ON t1(b);
1020
1020
CREATE INDEX idx_a ON t0(a);
1021
1021
EXPLAIN EXTENDED
1065
1065
1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
1066
1066
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1068
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t3`.`b` = `test`.`t4`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
1068
Note 1003 select "test"."t0"."a" AS "a","test"."t0"."b" AS "b","test"."t1"."a" AS "a","test"."t1"."b" AS "b","test"."t2"."a" AS "a","test"."t2"."b" AS "b","test"."t3"."a" AS "a","test"."t3"."b" AS "b","test"."t4"."a" AS "a","test"."t4"."b" AS "b","test"."t5"."a" AS "a","test"."t5"."b" AS "b","test"."t6"."a" AS "a","test"."t6"."b" AS "b","test"."t7"."a" AS "a","test"."t7"."b" AS "b","test"."t8"."a" AS "a","test"."t8"."b" AS "b","test"."t9"."a" AS "a","test"."t9"."b" AS "b" from "test"."t0" join "test"."t1" left join ("test"."t2" left join ("test"."t3" join "test"."t4") on((("test"."t4"."b" = "test"."t2"."b") and ("test"."t3"."a" = 1))) join "test"."t5" left join ("test"."t6" join "test"."t7" left join "test"."t8" on((("test"."t8"."b" = "test"."t5"."b") and ("test"."t6"."b" < 10)))) on((("test"."t7"."b" = "test"."t5"."b") and ("test"."t6"."b" >= 2)))) on(((("test"."t3"."b" = 2) or isnull("test"."t3"."c")) and (("test"."t6"."b" = 2) or isnull("test"."t6"."c")) and (("test"."t5"."b" = "test"."t0"."b") or isnull("test"."t3"."c") or isnull("test"."t6"."c") or isnull("test"."t8"."c")) and ("test"."t1"."a" <> 2))) join "test"."t9" where (("test"."t9"."a" = 1) and ("test"."t1"."b" = "test"."t0"."b") and ("test"."t0"."a" = 1) and (("test"."t2"."a" >= 4) or isnull("test"."t2"."c")) and (("test"."t3"."a" < 5) or isnull("test"."t3"."c")) and (("test"."t3"."b" = "test"."t4"."b") or isnull("test"."t3"."c") or isnull("test"."t4"."c")) and (("test"."t5"."a" >= 2) or isnull("test"."t5"."c")) and (("test"."t6"."a" >= 4) or isnull("test"."t6"."c")) and (("test"."t7"."a" <= 2) or isnull("test"."t7"."c")) and (("test"."t8"."a" < 1) or isnull("test"."t8"."c")) and (("test"."t9"."b" = "test"."t8"."b") or isnull("test"."t8"."c")))
1069
1069
SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
1070
1070
t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
1470
1470
(231063394),(231063424),(231063454),(231063514),(231063574),(231063664);
1471
1471
CREATE TABLE t4 (
1472
1472
carrier char(2) NOT NULL default '' PRIMARY KEY,
1473
id int default NULL,
1473
id int(11) default NULL,
1476
1476
INSERT INTO t4 VALUES
1502
1502
ON t4.carrier = t1.carrier;
1503
1503
id select_type table type possible_keys key key_len ref rows Extra
1504
1504
1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 36
1505
1 SIMPLE t4 eq_ref PRIMARY,id PRIMARY 10 test.t1.carrier 1
1505
1 SIMPLE t4 eq_ref PRIMARY,id PRIMARY 2 test.t1.carrier 1
1506
1506
1 SIMPLE t5 ref carrier_id carrier_id 5 test.t4.id 1 Using index
1507
1507
1 SIMPLE t2 ref package_id package_id 5 test.t1.id 1 Using index
1508
1508
1 SIMPLE t3 ref package_id package_id 5 test.t1.id 1 Using index