Details
-
Task
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
Description
Support EXPLAIN FORMAT=JSON like MySQL 5.6 does.
Difference from MySQL's EXPLAIN FORMAT=JSON
We don't want to copy MySQL 5.6:
From the user point of view:
- 5.6 output format is not documented and unstable (even MySQL Workbench fails to parse it in some cases)
- I don't expect that any 3rd party is able to parse it, other than relying that it's a well-formed JSON document.
- 5.6 output format doesn't allow to display some info we want to display
- 5.6's output format has legacy of tabular output format in many places
- MariaDB has more optimizer features, so we will have to produce output that 5.6 never produces
Currently supported
- Basic SELECTs
- Table access methods
- full table/index scans
- range access
- index_merge access
- I_S read optimizations
- "Using where" (attached_condition)
- rows and 'filtered' columns
- Index Condition Pushdown ('index_condition')
- UNIONs (incomplete)
- Item-based subqueries (incomplete)
- Basic join buffering
- Single-table UPDATE/DELETE
- Derived tables
- Non-merged semi-joins (JTBMs)
- [Merged] Semi-joins: SJ-Materialization
- [Merged] Semi-joins: FirstMatch, DuplicateElimination, LooseScan
Not yet supported (important)
- ORDER BY/GROUP BY/ DISTINCT handling – as agreed won't be ready before 10.1.2
Not yet supported (less important)
- Subquery cache feature
- Advanced join buffering (display MRR as a special kind of scan)
Attachments
Issue Links
- relates to
-
MDEV-6995 EXPLAIN JSON and ORDER BY, GROUP BY, etc
-
- Open
-
-
MDEV-7248 EXPLAIN FORMAT=JSON: Better output
-
- Open
-
-
MDEV-7264 Assertion `0' failed in subselect_engine::get_identifier() on EXPLAIN FORMAT=JSON
-
- Closed
-
-
MDEV-7265 Assertion `0' failed in Explain_table_access::tag_to_json(Json_writer*, explain_extra_tag)
-
- Closed
-
-
MDEV-7266 Assertion `!element_started' failed in Json_writer& Json_writer::add_member(const char*)
-
- Closed
-
-
MDEV-7267 Server crashes in Item_field::print on ANALYZE FORMAT=JSON
-
- Closed
-
- links to
How MySQL-5.6 displays semi-join subquery plans:
FirstMatch:
"table" : { .... ,"first_match" : "other_table", ... }
Duplicate Elimination:
"duplicates_removal": {
"using_temporary_table": true,
"nested_loop": [ ... tables are here ]
}
SJ-Materialization looks barely distinguishable from derived table:
"table": {
"table_name": "<subquery2>",
"access_type": "ALL",
"materialized_from_subquery": {
"using_temporary_table": true,
"query_block": {
... suquery goes here
}
}
LooseScan
The table being scanned has:
"loosescan": true,