1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

EXPLAIN FORMAT=JSON: Add support for non-merged semi-joins

This commit is contained in:
Sergei Petrunia
2014-11-29 01:08:18 +03:00
parent 2ac3b39e68
commit 0b5d989c89
7 changed files with 117 additions and 7 deletions

View File

@ -464,4 +464,46 @@ EXPLAIN
}
}
}
#
# Non-merged semi-join (aka JTBM)
#
explain format=json
select * from t1 where a in (select max(a) from t1 group by b);
EXPLAIN
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 10,
"filtered": 100,
"attached_condition": "(t1.a is not null)"
},
"table": {
"table_name": "<subquery2>",
"access_type": "eq_ref",
"possible_keys": ["distinct_key"],
"key": "distinct_key",
"key_length": "4",
"used_key_parts": ["max(a)"],
"ref": ["test.t1.a"],
"rows": 1,
"filtered": 100,
"materialized": {
"unique": 1,
"query_block": {
"select_id": 2,
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 10,
"filtered": 100
}
}
}
}
}
}
drop table t1;
drop table t0;