mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
EXPLAIN FORMAT=JSON
Add support for semi-join strategies: FirstMatch, DuplicateWeedout, LooseScan.
This commit is contained in:
@@ -114,6 +114,25 @@ insert into t2 select * from t1;
|
||||
explain format=json
|
||||
select * from t1,t2 where t1.a in ( select a from t0);
|
||||
|
||||
--echo #
|
||||
--echo # First-Match
|
||||
--echo #
|
||||
explain
|
||||
select * from t2 where t2.a in ( select a from t1 where t1.b=t2.b);
|
||||
explain format=json
|
||||
select * from t2 where t2.a in ( select a from t1 where t1.b=t2.b);
|
||||
|
||||
--echo #
|
||||
--echo # Duplicate Weedout
|
||||
--echo #
|
||||
set @tmp= @@optimizer_switch;
|
||||
set optimizer_switch='firstmatch=off';
|
||||
explain
|
||||
select * from t2 where t2.a in ( select a from t1 where t1.b=t2.b);
|
||||
explain format=json
|
||||
select * from t2 where t2.a in ( select a from t1 where t1.b=t2.b);
|
||||
set optimizer_switch=@tmp;
|
||||
|
||||
drop table t1,t2;
|
||||
drop table t0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user