1
0
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:
Sergei Petrunia
2014-12-02 01:40:10 +03:00
parent a35b05399e
commit 0000695025
5 changed files with 123 additions and 3 deletions

View File

@@ -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;