Skip to content

Commit

Permalink
repair the mtr:main.temptable
Browse files Browse the repository at this point in the history
  • Loading branch information
yibantianxia committed Jun 21, 2021
1 parent 03ca18e commit b3de24a
Show file tree
Hide file tree
Showing 14 changed files with 5,500 additions and 118 deletions.
7 changes: 4 additions & 3 deletions mysql-test/r/explain_tree.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,10 @@ test.t2 analyze status OK
EXPLAIN format=tree SELECT * FROM t1 WHERE t1.i IN (SELECT t2.i FROM t2);
EXPLAIN
-> Parallel scan on <temporary>
-> Nested loop inner join (cost=2.05 rows=4)
-> Filter: (t2.i is not null) (cost=0.65 rows=4)
-> PQblock scan on t2 using i1 (cost=0.65 rows=4)
-> Nested loop inner join
-> Remove duplicates from input sorted on i1
-> Filter: (t2.i is not null) (cost=0.65 rows=4)
-> PQblock scan on t2 using i1 (cost=0.65 rows=4)
-> Single-row index lookup on t1 using PRIMARY (i=t2.i) (cost=1.10 rows=1)

DROP TABLE t1;
Expand Down
14 changes: 7 additions & 7 deletions mysql-test/r/loose_scan.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ SELECT t2.col_varchar_key FROM t2 WHERE t2.pk > t1.col_int
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL # 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL ALL NULL NULL NULL NULL # 100.00 NULL
2 SIMPLE t2 NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL # 100.00 Using where; Using index
2 SIMPLE t2 NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL # 100.00 Using where; Using index; LooseScan
2 SIMPLE t3 NULL ref col_varchar_key col_varchar_key 7 test.t2.col_varchar_key # 100.00 Using index
Warnings:
Note 1276 Field or reference 'test.t1.col_int' of SELECT #2 was resolved in SELECT #1
Expand Down Expand Up @@ -189,15 +189,15 @@ FROM t3 JOIN t4 ON t3.pk = t4.pk
);
EXPLAIN
-> Parallel scan on <temporary>
-> Inner hash join (t2.b = t1.a) (cost=2.90 rows=2)
-> Inner hash join (t2.b = t1.a) (cost=2.00 rows=2)
-> Table scan on t2 (cost=0.18 rows=3)
-> Hash
-> Nested loop semijoin (cost=2.05 rows=2)
-> Nested loop inner join (cost=1.15 rows=2)
-> PQblock scan on t1 (cost=0.45 rows=2)
-> Nested loop inner join (cost=1.15 rows=2)
-> PQblock scan on t1 (cost=0.45 rows=2)
-> Nested loop semijoin with duplicate removal on b_key (cost=1.00 rows=1)
-> Index lookup on t3 using b_key (b=t1.a) (cost=0.30 rows=1)
-> Filter: (t4.pk = t3.pk) (cost=0.30 rows=1)
-> Table scan on t4 (cost=0.30 rows=2)
-> Filter: (t4.pk = t3.pk) (cost=0.30 rows=1)
-> Table scan on t4 (cost=0.30 rows=2)

SELECT *
FROM t1
Expand Down
137 changes: 75 additions & 62 deletions mysql-test/r/opt_hints_join_order.result-pq

Large diffs are not rendered by default.

1,928 changes: 1,928 additions & 0 deletions mysql-test/r/opt_hints_subquery.result-pq

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions mysql-test/r/subquery_exists.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ pk uk ukn ik d
EXPLAIN SELECT * FROM t2 AS ot
WHERE EXISTS (SELECT * FROM t1 AS it WHERE it.ik = ot.pk);
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 3 100.00 Parallel execute (1 workers)
2 SIMPLE it NULL index ik ik 5 NULL 3 100.00 Using where; Using index
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 3 100.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE it NULL index ik ik 5 NULL 3 100.00 Using where; Using index; LooseScan
2 SIMPLE ot NULL eq_ref PRIMARY PRIMARY 4 test.it.ik 1 100.00 Using index
Warnings:
Note 1276 Field or reference 'test.ot.pk' of SELECT #2 was resolved in SELECT #1
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/r/subquery_sj_all.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -12170,8 +12170,8 @@ WHERE innr.pk <= 7
)
;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE outr NULL ALL NULL NULL NULL NULL 3 33.33 Using where; Using join buffer (hash join)
Warnings:
Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_nokey` = `test`.`innr`.`col_varchar_key`) and (`test`.`innr`.`pk` <= 7))
Expand Down Expand Up @@ -12253,7 +12253,7 @@ WHERE t3.pk < 3
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 1 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 NULL
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE t2 NULL ref PRIMARY,c1_key c1_key 6 test.t3.c1 1 33.33 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`i1` AS `i1`,`test`.`t2`.`pk` AS `pk`,`test`.`t2`.`c1` AS `c1` from `test`.`t1` join `test`.`t2` semi join (`test`.`t3`) where ((`test`.`t2`.`c1` = `test`.`t3`.`c1`) and (`test`.`t3`.`pk` < 3) and (`test`.`t1`.`i1` >= `test`.`t2`.`pk`))
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/r/subquery_sj_all_bka.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -12176,8 +12176,8 @@ WHERE innr.pk <= 7
)
;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE outr NULL ALL NULL NULL NULL NULL 3 33.33 Using where; Using join buffer (hash join)
Warnings:
Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_nokey` = `test`.`innr`.`col_varchar_key`) and (`test`.`innr`.`pk` <= 7))
Expand Down Expand Up @@ -12259,7 +12259,7 @@ WHERE t3.pk < 3
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 1 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 NULL
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE t2 NULL ref PRIMARY,c1_key c1_key 6 test.t3.c1 1 33.33 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`i1` AS `i1`,`test`.`t2`.`pk` AS `pk`,`test`.`t2`.`c1` AS `c1` from `test`.`t1` join `test`.`t2` semi join (`test`.`t3`) where ((`test`.`t2`.`c1` = `test`.`t3`.`c1`) and (`test`.`t3`.`pk` < 3) and (`test`.`t1`.`i1` >= `test`.`t2`.`pk`))
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/r/subquery_sj_all_bka_nobnl.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -12180,8 +12180,8 @@ WHERE innr.pk <= 7
)
;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE outr NULL ALL NULL NULL NULL NULL 3 33.33 Using where
Warnings:
Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_nokey` = `test`.`innr`.`col_varchar_key`) and (`test`.`innr`.`pk` <= 7))
Expand Down Expand Up @@ -12263,7 +12263,7 @@ WHERE t3.pk < 3
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 1 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 NULL
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE t2 NULL ref PRIMARY,c1_key c1_key 6 test.t3.c1 1 33.33 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`i1` AS `i1`,`test`.`t2`.`pk` AS `pk`,`test`.`t2`.`c1` AS `c1` from `test`.`t1` join `test`.`t2` semi join (`test`.`t3`) where ((`test`.`t2`.`c1` = `test`.`t3`.`c1`) and (`test`.`t3`.`pk` < 3) and (`test`.`t1`.`i1` >= `test`.`t2`.`pk`))
Expand Down
12 changes: 6 additions & 6 deletions mysql-test/r/subquery_sj_loosescan.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -8775,8 +8775,8 @@ WHERE innr.col_varchar_key = 'a' OR innr.pk = 8)
AND outr.col_varchar_nokey < 't'
ORDER BY outr.col_varchar_key, outr.pk;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 55.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 55.00 Using where; Using index; Using temporary; Using filesort
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 55.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 55.00 Using where; Using index; Using temporary; Using filesort; LooseScan
2 SIMPLE outr NULL ref col_varchar_key col_varchar_key 6 test.innr.col_varchar_key 1 33.33 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`outr`.`col_varchar_key` AS `x`,`test`.`outr`.`pk` AS `y` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_key` = `test`.`innr`.`col_varchar_key`) and (`test`.`outr`.`col_varchar_nokey` < 't') and ((`test`.`innr`.`col_varchar_key` = 'a') or (`test`.`innr`.`pk` = 8))) order by `test`.`outr`.`col_varchar_key`,`test`.`outr`.`pk`
Expand Down Expand Up @@ -9866,7 +9866,7 @@ FROM t2 AS it1 JOIN t1 AS it2 ON it2.col_int_key = it1.pk);
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 100.00 Parallel execute (1 workers)
2 SIMPLE ot1 NULL index col_varchar_key col_varchar_key 10 NULL 20 100.00 Using index
2 SIMPLE it1 NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 80.00 Using index
2 SIMPLE it1 NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 80.00 Using index; LooseScan
2 SIMPLE it2 NULL ref col_int_key col_int_key 4 test.it1.pk 1 10.00 Using where; FirstMatch(it1)
2 SIMPLE ot2 NULL ALL NULL NULL NULL NULL 20 10.00 Using where; Using join buffer (hash join)
Warnings:
Expand Down Expand Up @@ -12088,8 +12088,8 @@ WHERE innr.pk <= 7
)
;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE outr NULL ALL NULL NULL NULL NULL 3 33.33 Using where; Using join buffer (hash join)
Warnings:
Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_nokey` = `test`.`innr`.`col_varchar_key`) and (`test`.`innr`.`pk` <= 7))
Expand Down Expand Up @@ -12171,7 +12171,7 @@ WHERE t3.pk < 3
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 1 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 NULL
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE t2 NULL ref PRIMARY,c1_key c1_key 6 test.t3.c1 1 33.33 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`i1` AS `i1`,`test`.`t2`.`pk` AS `pk`,`test`.`t2`.`c1` AS `c1` from `test`.`t1` join `test`.`t2` semi join (`test`.`t3`) where ((`test`.`t2`.`c1` = `test`.`t3`.`c1`) and (`test`.`t3`.`pk` < 3) and (`test`.`t1`.`i1` >= `test`.`t2`.`pk`))
Expand Down
12 changes: 6 additions & 6 deletions mysql-test/r/subquery_sj_loosescan_bka.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -8776,8 +8776,8 @@ WHERE innr.col_varchar_key = 'a' OR innr.pk = 8)
AND outr.col_varchar_nokey < 't'
ORDER BY outr.col_varchar_key, outr.pk;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 55.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 55.00 Using where; Using index; Using temporary; Using filesort
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 55.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 55.00 Using where; Using index; Using temporary; Using filesort; LooseScan
2 SIMPLE outr NULL ref col_varchar_key col_varchar_key 6 test.innr.col_varchar_key 1 33.33 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`outr`.`col_varchar_key` AS `x`,`test`.`outr`.`pk` AS `y` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_key` = `test`.`innr`.`col_varchar_key`) and (`test`.`outr`.`col_varchar_nokey` < 't') and ((`test`.`innr`.`col_varchar_key` = 'a') or (`test`.`innr`.`pk` = 8))) order by `test`.`outr`.`col_varchar_key`,`test`.`outr`.`pk`
Expand Down Expand Up @@ -9867,7 +9867,7 @@ FROM t2 AS it1 JOIN t1 AS it2 ON it2.col_int_key = it1.pk);
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 100.00 Parallel execute (1 workers)
2 SIMPLE ot1 NULL index col_varchar_key col_varchar_key 10 NULL 20 100.00 Using index
2 SIMPLE it1 NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 80.00 Using index
2 SIMPLE it1 NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 80.00 Using index; LooseScan
2 SIMPLE it2 NULL ref col_int_key col_int_key 4 test.it1.pk 1 10.00 Using where; FirstMatch(it1)
2 SIMPLE ot2 NULL ALL NULL NULL NULL NULL 20 10.00 Using where; Using join buffer (hash join)
Warnings:
Expand Down Expand Up @@ -12089,8 +12089,8 @@ WHERE innr.pk <= 7
)
;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE outr NULL ALL NULL NULL NULL NULL 3 33.33 Using where; Using join buffer (hash join)
Warnings:
Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_nokey` = `test`.`innr`.`col_varchar_key`) and (`test`.`innr`.`pk` <= 7))
Expand Down Expand Up @@ -12172,7 +12172,7 @@ WHERE t3.pk < 3
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 1 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 NULL
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE t2 NULL ref PRIMARY,c1_key c1_key 6 test.t3.c1 1 33.33 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`i1` AS `i1`,`test`.`t2`.`pk` AS `pk`,`test`.`t2`.`c1` AS `c1` from `test`.`t1` join `test`.`t2` semi join (`test`.`t3`) where ((`test`.`t2`.`c1` = `test`.`t3`.`c1`) and (`test`.`t3`.`pk` < 3) and (`test`.`t1`.`i1` >= `test`.`t2`.`pk`))
Expand Down
12 changes: 6 additions & 6 deletions mysql-test/r/subquery_sj_loosescan_bka_nobnl.result-pq
Original file line number Diff line number Diff line change
Expand Up @@ -8778,8 +8778,8 @@ WHERE innr.col_varchar_key = 'a' OR innr.pk = 8)
AND outr.col_varchar_nokey < 't'
ORDER BY outr.col_varchar_key, outr.pk;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 55.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 55.00 Using where; Using index; Using temporary; Using filesort
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 55.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 55.00 Using where; Using index; Using temporary; Using filesort; LooseScan
2 SIMPLE outr NULL ref col_varchar_key col_varchar_key 6 test.innr.col_varchar_key 1 33.33 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`outr`.`col_varchar_key` AS `x`,`test`.`outr`.`pk` AS `y` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_key` = `test`.`innr`.`col_varchar_key`) and (`test`.`outr`.`col_varchar_nokey` < 't') and ((`test`.`innr`.`col_varchar_key` = 'a') or (`test`.`innr`.`pk` = 8))) order by `test`.`outr`.`col_varchar_key`,`test`.`outr`.`pk`
Expand Down Expand Up @@ -9869,7 +9869,7 @@ FROM t2 AS it1 JOIN t1 AS it2 ON it2.col_int_key = it1.pk);
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 20 100.00 Parallel execute (1 workers)
2 SIMPLE ot1 NULL index col_varchar_key col_varchar_key 10 NULL 20 100.00 Using index
2 SIMPLE it1 NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 80.00 Using index
2 SIMPLE it1 NULL index PRIMARY,col_varchar_key col_varchar_key 10 NULL 20 80.00 Using index; LooseScan
2 SIMPLE it2 NULL ref col_int_key col_int_key 4 test.it1.pk 1 10.00 Using where; FirstMatch(it1)
2 SIMPLE ot2 NULL ALL NULL NULL NULL NULL 20 10.00 Using where
Warnings:
Expand Down Expand Up @@ -12083,8 +12083,8 @@ WHERE innr.pk <= 7
)
;
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 2 100.00 LooseScan; Parallel execute (1 workers)
2 SIMPLE innr NULL index PRIMARY,col_varchar_key col_varchar_key 7 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE outr NULL ALL NULL NULL NULL NULL 3 33.33 Using where
Warnings:
Note 1003 /* select#1 */ select 1 AS `1` from `test`.`t1` `outr` semi join (`test`.`t2` `innr`) where ((`test`.`outr`.`col_varchar_nokey` = `test`.`innr`.`col_varchar_key`) and (`test`.`innr`.`pk` <= 7))
Expand Down Expand Up @@ -12166,7 +12166,7 @@ WHERE t3.pk < 3
id select_type table partitions type possible_keys key key_len ref rows filtered Extra
1 SIMPLE <gather2> NULL ALL NULL NULL NULL NULL 1 100.00 Parallel execute (1 workers)
2 SIMPLE t1 NULL ALL NULL NULL NULL NULL 1 100.00 NULL
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index
2 SIMPLE t3 NULL index PRIMARY,c1_key c1_key 6 NULL 2 100.00 Using where; Using index; LooseScan
2 SIMPLE t2 NULL ref PRIMARY,c1_key c1_key 6 test.t3.c1 1 33.33 Using where; Using index
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`pk` AS `pk`,`test`.`t1`.`i1` AS `i1`,`test`.`t2`.`pk` AS `pk`,`test`.`t2`.`c1` AS `c1` from `test`.`t1` join `test`.`t2` semi join (`test`.`t3`) where ((`test`.`t2`.`c1` = `test`.`t3`.`c1`) and (`test`.`t3`.`pk` < 3) and (`test`.`t1`.`i1` >= `test`.`t2`.`pk`))
Expand Down
Loading

0 comments on commit b3de24a

Please sign in to comment.