You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
If the storage engine supports sorted MRR, and this is not part of an outer join, then BKA will actually always produce ordered results. Outer joins are unordered because the BKA algorithm outputs matching rows first, followed by non-matching rows. It is probably possible to extend `BKAIterator::Read` to always produced sorted rows if sorted MRR is supported, and get rid of the outer join check. The current check also includes antijoins, even though antijoins also produce sorted output.
Because the decision to use BKA is not cost based, and it is always chosen if available, it will sometimes regress plans when NLJ can skip filesort while BKA cannot skip filesort. To fix this, produce BKA only if it produces ordered results, or if there's no order by clause.
If the order by clause does not match the order of the outer table, then technically BKA is still usable, since filesort is needed regardless of BKA/NLJ. This case is not handled here, and NLJ will always be chosen.
Reviewed By: luqun
Differential Revision: D35678857
Copy file name to clipboardExpand all lines: mysql-test/r/join_cache_bka.result
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1526,8 +1526,8 @@ explain
1526
1526
select t1.a, count(t2.p) as count
1527
1527
from t1 left join t2 on t1.a=t2.a and t2.p % 2 = 1 group by t1.a;
1528
1528
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1529
-
1 SIMPLE t1 NULL index PRIMARY PRIMARY 4 NULL # 100.00 Using index; Using temporary
1530
-
1 SIMPLE t2 NULL ref i_a i_a 5 test.t1.a # 100.00 Using where; Using join buffer (Batched Key Access)
1529
+
1 SIMPLE t1 NULL index PRIMARY PRIMARY 4 NULL # 100.00 Using index
1530
+
1 SIMPLE t2 NULL ref i_a i_a 5 test.t1.a # 100.00 Using where
1531
1531
Warnings:
1532
1532
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,count(`test`.`t2`.`p`) AS `count` from `test`.`t1` left join `test`.`t2` on(((`test`.`t2`.`a` = `test`.`t1`.`a`) and ((`test`.`t2`.`p` % 2) = 1))) where true group by `test`.`t1`.`a`
1533
1533
select t1.a, count(t2.p) as count
@@ -1888,8 +1888,8 @@ explain
1888
1888
select t1.id1, sum(t2.id2) from t1 join t2 on t1.id1=t2.id1
1889
1889
where t1.d=3 group by t1.id1;
1890
1890
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1891
-
1 SIMPLE t1 NULL ref idx1 idx1 5 const 4 100.00 Using where; Using index; Using temporary
Note 1003 /* select#1 */ select `test`.`t1`.`id1` AS `id1`,sum(`test`.`t2`.`id2`) AS `sum(t2.id2)` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`id1` = `test`.`t1`.`id1`) and (`test`.`t1`.`d` = 3)) group by `test`.`t1`.`id1`
1895
1895
select t1.id1, sum(t2.id2) from t1 join t2 on t1.id1=t2.id1
@@ -2475,7 +2475,7 @@ ORDER BY t1.col_int_key, t1.col_datetime
2475
2475
LIMIT 2;
2476
2476
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
2477
2477
1 SIMPLE t1 NULL ALL col_int_key NULL NULL NULL 4 100.00 Using temporary; Using filesort
2478
-
1 SIMPLE t2 NULL ref col_int_key col_int_key 5 const 2 50.00 Using where; Using join buffer (Batched Key Access)
2478
+
1 SIMPLE t2 NULL ref col_int_key col_int_key 5 const 2 50.00 Using where
2479
2479
Warnings:
2480
2480
Note 1003 /* select#1 */ select `test`.`t1`.`col_int_key` AS `col_int_key`,`test`.`t1`.`col_datetime` AS `col_datetime` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`col_int_key` = 1) and (`test`.`t2`.`col_int` >= 3)) group by `test`.`t1`.`col_int_key` order by `test`.`t1`.`col_int_key`,`test`.`t1`.`col_datetime` limit 2
2481
2481
SELECT t1.col_int_key, t1.col_datetime
@@ -2778,8 +2778,8 @@ ON t1.col_varchar_key = t2.col_varchar_key
2778
2778
GROUP BY field2
2779
2779
ORDER BY field1;
2780
2780
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
2781
-
1 SIMPLE t1 NULL index col_int_key,col_varchar_key col_varchar_key 10 NULL 3 100.00 Using index; Using temporary; Using filesort
Note 1003 /* select#1 */ select min(`test`.`t2`.`col_datetime_key`) AS `field1`,`test`.`t1`.`col_int_key` AS `field2` from `test`.`t1` left join `test`.`t2` FORCE INDEX (`col_varchar_key`) on((`test`.`t2`.`col_varchar_key` = `test`.`t1`.`col_varchar_key`)) where true group by `field2` order by `field1`
2785
2785
SELECT MIN(t2.col_datetime_key) AS field1,
@@ -2847,7 +2847,7 @@ GROUP BY field1 , field4
2847
2847
ORDER BY t1.col_datetime_key ;
2848
2848
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
2849
2849
1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 20 100.00 Using temporary; Using filesort
Note 1003 /* select#1 */ select `test`.`t2`.`col_varchar_key` AS `field1`,count(distinct `test`.`t1`.`col_varchar_nokey`) AS `COUNT(DISTINCT t1.col_varchar_nokey)`,`test`.`t2`.`pk` AS `field4` from `test`.`t2` left join `test`.`t1` on((`test`.`t1`.`col_int_key` = `test`.`t2`.`pk`)) where true group by `field1`,`field4` order by `test`.`t1`.`col_datetime_key`
2853
2853
SELECT t2.col_varchar_key AS field1 , COUNT(DISTINCT t1.col_varchar_nokey), t2.pk AS field4
Copy file name to clipboardExpand all lines: mysql-test/r/join_cache_bka_nobnl.result
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1526,8 +1526,8 @@ explain
1526
1526
select t1.a, count(t2.p) as count
1527
1527
from t1 left join t2 on t1.a=t2.a and t2.p % 2 = 1 group by t1.a;
1528
1528
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1529
-
1 SIMPLE t1 NULL index PRIMARY PRIMARY 4 NULL # 100.00 Using index; Using temporary
1530
-
1 SIMPLE t2 NULL ref i_a i_a 5 test.t1.a # 100.00 Using where; Using join buffer (Batched Key Access)
1529
+
1 SIMPLE t1 NULL index PRIMARY PRIMARY 4 NULL # 100.00 Using index
1530
+
1 SIMPLE t2 NULL ref i_a i_a 5 test.t1.a # 100.00 Using where
1531
1531
Warnings:
1532
1532
Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a`,count(`test`.`t2`.`p`) AS `count` from `test`.`t1` left join `test`.`t2` on(((`test`.`t2`.`a` = `test`.`t1`.`a`) and ((`test`.`t2`.`p` % 2) = 1))) where true group by `test`.`t1`.`a`
1533
1533
select t1.a, count(t2.p) as count
@@ -1888,8 +1888,8 @@ explain
1888
1888
select t1.id1, sum(t2.id2) from t1 join t2 on t1.id1=t2.id1
1889
1889
where t1.d=3 group by t1.id1;
1890
1890
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1891
-
1 SIMPLE t1 NULL ref idx1 idx1 5 const 4 100.00 Using where; Using index; Using temporary
Note 1003 /* select#1 */ select `test`.`t1`.`id1` AS `id1`,sum(`test`.`t2`.`id2`) AS `sum(t2.id2)` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`id1` = `test`.`t1`.`id1`) and (`test`.`t1`.`d` = 3)) group by `test`.`t1`.`id1`
1895
1895
select t1.id1, sum(t2.id2) from t1 join t2 on t1.id1=t2.id1
@@ -1902,8 +1902,8 @@ explain
1902
1902
select t1.id1 from t1 join t2 on t1.id1=t2.id1
1903
1903
where t1.d=3 and t2.id2 > 200 order by t1.id1;
1904
1904
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1905
-
1 SIMPLE t1 NULL ref idx1 idx1 5 const 4 100.00 Using where; Using index; Using temporary; Using filesort
1906
-
1 SIMPLE t2 NULL ref idx2 idx2 5 test.t1.id1 3 33.33 Using where; Using join buffer (Batched Key Access)
1905
+
1 SIMPLE t1 NULL ref idx1 idx1 5 const 4 100.00 Using where; Using index
1906
+
1 SIMPLE t2 NULL ref idx2 idx2 5 test.t1.id1 3 33.33 Using where
1907
1907
Warnings:
1908
1908
Note 1003 /* select#1 */ select `test`.`t1`.`id1` AS `id1` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`id1` = `test`.`t1`.`id1`) and (`test`.`t1`.`d` = 3) and (`test`.`t2`.`id2` > 200)) order by `test`.`t1`.`id1`
1909
1909
select t1.id1 from t1 join t2 on t1.id1=t2.id1
@@ -2475,7 +2475,7 @@ ORDER BY t1.col_int_key, t1.col_datetime
2475
2475
LIMIT 2;
2476
2476
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
2477
2477
1 SIMPLE t1 NULL ALL col_int_key NULL NULL NULL 4 100.00 Using temporary; Using filesort
2478
-
1 SIMPLE t2 NULL ref col_int_key col_int_key 5 const 2 50.00 Using where; Using join buffer (Batched Key Access)
2478
+
1 SIMPLE t2 NULL ref col_int_key col_int_key 5 const 2 50.00 Using where
2479
2479
Warnings:
2480
2480
Note 1003 /* select#1 */ select `test`.`t1`.`col_int_key` AS `col_int_key`,`test`.`t1`.`col_datetime` AS `col_datetime` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`col_int_key` = 1) and (`test`.`t2`.`col_int` >= 3)) group by `test`.`t1`.`col_int_key` order by `test`.`t1`.`col_int_key`,`test`.`t1`.`col_datetime` limit 2
2481
2481
SELECT t1.col_int_key, t1.col_datetime
@@ -2778,8 +2778,8 @@ ON t1.col_varchar_key = t2.col_varchar_key
2778
2778
GROUP BY field2
2779
2779
ORDER BY field1;
2780
2780
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
2781
-
1 SIMPLE t1 NULL index col_int_key,col_varchar_key col_varchar_key 10 NULL 3 100.00 Using index; Using temporary; Using filesort
Note 1003 /* select#1 */ select min(`test`.`t2`.`col_datetime_key`) AS `field1`,`test`.`t1`.`col_int_key` AS `field2` from `test`.`t1` left join `test`.`t2` FORCE INDEX (`col_varchar_key`) on((`test`.`t2`.`col_varchar_key` = `test`.`t1`.`col_varchar_key`)) where true group by `field2` order by `field1`
2785
2785
SELECT MIN(t2.col_datetime_key) AS field1,
@@ -2847,7 +2847,7 @@ GROUP BY field1 , field4
2847
2847
ORDER BY t1.col_datetime_key ;
2848
2848
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
2849
2849
1 SIMPLE t2 NULL ALL NULL NULL NULL NULL 20 100.00 Using temporary; Using filesort
Note 1003 /* select#1 */ select `test`.`t2`.`col_varchar_key` AS `field1`,count(distinct `test`.`t1`.`col_varchar_nokey`) AS `COUNT(DISTINCT t1.col_varchar_nokey)`,`test`.`t2`.`pk` AS `field4` from `test`.`t2` left join `test`.`t1` on((`test`.`t1`.`col_int_key` = `test`.`t2`.`pk`)) where true group by `field1`,`field4` order by `test`.`t1`.`col_datetime_key`
2853
2853
SELECT t2.col_varchar_key AS field1 , COUNT(DISTINCT t1.col_varchar_nokey), t2.pk AS field4
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
644
644
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
645
645
1 SIMPLE t1 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
646
-
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 Using join buffer (Batched Key Access)
646
+
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 NULL
647
647
Warnings:
648
648
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t3`.`period` = `test`.`t1`.`period`) order by `test`.`t3`.`period`
649
649
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
650
650
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
651
-
1 SIMPLE t3 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
652
-
1 SIMPLE t1 NULL ref period period 4 test.t3.period 4181 100.00 Using join buffer (Batched Key Access)
651
+
1 SIMPLE t3 NULL index period period 4 NULL 1 100.00 NULL
652
+
1 SIMPLE t1 NULL ref period period 4 test.t3.period 4181 100.00 NULL
653
653
Warnings:
654
654
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t1`.`period` = `test`.`t3`.`period`) order by `test`.`t3`.`period` limit 10
655
655
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
656
656
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
657
-
1 SIMPLE t1 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
658
-
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 Using join buffer (Batched Key Access)
657
+
1 SIMPLE t1 NULL index period period 4 NULL 1 100.00 NULL
658
+
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 NULL
659
659
Warnings:
660
660
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t3`.`period` = `test`.`t1`.`period`) order by `test`.`t1`.`period` limit 10
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
644
644
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
645
645
1 SIMPLE t1 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
646
-
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 Using join buffer (Batched Key Access)
646
+
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 NULL
647
647
Warnings:
648
648
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t3`.`period` = `test`.`t1`.`period`) order by `test`.`t3`.`period`
649
649
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
650
650
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
651
-
1 SIMPLE t3 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
652
-
1 SIMPLE t1 NULL ref period period 4 test.t3.period 4181 100.00 Using join buffer (Batched Key Access)
651
+
1 SIMPLE t3 NULL index period period 4 NULL 1 100.00 NULL
652
+
1 SIMPLE t1 NULL ref period period 4 test.t3.period 4181 100.00 NULL
653
653
Warnings:
654
654
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t1`.`period` = `test`.`t3`.`period`) order by `test`.`t3`.`period` limit 10
655
655
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
656
656
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
657
-
1 SIMPLE t1 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
658
-
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 Using join buffer (Batched Key Access)
657
+
1 SIMPLE t1 NULL index period period 4 NULL 1 100.00 NULL
658
+
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 NULL
659
659
Warnings:
660
660
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t3`.`period` = `test`.`t1`.`period`) order by `test`.`t1`.`period` limit 10
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
644
644
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
645
645
1 SIMPLE t1 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
646
-
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 Using join buffer (Batched Key Access)
646
+
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 NULL
647
647
Warnings:
648
648
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t3`.`period` = `test`.`t1`.`period`) order by `test`.`t3`.`period`
649
649
explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
650
650
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
651
-
1 SIMPLE t3 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
652
-
1 SIMPLE t1 NULL ref period period 4 test.t3.period 4181 100.00 Using join buffer (Batched Key Access)
651
+
1 SIMPLE t3 NULL index period period 4 NULL 1 100.00 NULL
652
+
1 SIMPLE t1 NULL ref period period 4 test.t3.period 4181 100.00 NULL
653
653
Warnings:
654
654
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t1`.`period` = `test`.`t3`.`period`) order by `test`.`t3`.`period` limit 10
655
655
explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
656
656
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
657
-
1 SIMPLE t1 NULL ALL period NULL NULL NULL 41810 100.00 Using temporary; Using filesort
658
-
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 Using join buffer (Batched Key Access)
657
+
1 SIMPLE t1 NULL index period period 4 NULL 1 100.00 NULL
658
+
1 SIMPLE t3 NULL ref period period 4 test.t1.period 4181 100.00 NULL
659
659
Warnings:
660
660
Note 1003 /* select#1 */ select `test`.`t1`.`t2nr` AS `t2nr`,`test`.`t1`.`period` AS `period`,`test`.`t1`.`name` AS `name`,`test`.`t1`.`companynr` AS `companynr`,`test`.`t1`.`price` AS `price`,`test`.`t1`.`price2` AS `price2`,`test`.`t3`.`t2nr` AS `t2nr`,`test`.`t3`.`period` AS `period`,`test`.`t3`.`name` AS `name`,`test`.`t3`.`companynr` AS `companynr`,`test`.`t3`.`price` AS `price`,`test`.`t3`.`price2` AS `price2` from `test`.`t3` `t1` join `test`.`t3` where (`test`.`t3`.`period` = `test`.`t1`.`period`) order by `test`.`t1`.`period` limit 10
0 commit comments