Description:
The JSON format output of EXPLAIN shows the table name, but not the table schema. This would be useful information to include in output:
mysql> EXPLAIN FORMAT = JSON SELECT * FROM d2.t1 JOIN d1.t1 USING (a)\G
*************************** 1. row ***************************
EXPLAIN: {
"query_block": {
"select_id": 1,
"nested_loop": [
{
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 1,
"filtered": 100
}
},
{
"table": {
"table_name": "t1",
"access_type": "ALL",
"rows": 1,
"filtered": 100,
"using_join_buffer": "Block Nested Loop",
"attached_condition": "(`d1`.`t1`.`a` = `d2`.`t1`.`a`)"
}
}
]
}
}
1 row in set, 1 warning (0.00 sec)
How to repeat:
See above.
Suggested fix:
Add table_schema attribute to table element in JSON EXPLAIN output.
Description: The JSON format output of EXPLAIN shows the table name, but not the table schema. This would be useful information to include in output: mysql> EXPLAIN FORMAT = JSON SELECT * FROM d2.t1 JOIN d1.t1 USING (a)\G *************************** 1. row *************************** EXPLAIN: { "query_block": { "select_id": 1, "nested_loop": [ { "table": { "table_name": "t1", "access_type": "ALL", "rows": 1, "filtered": 100 } }, { "table": { "table_name": "t1", "access_type": "ALL", "rows": 1, "filtered": 100, "using_join_buffer": "Block Nested Loop", "attached_condition": "(`d1`.`t1`.`a` = `d2`.`t1`.`a`)" } } ] } } 1 row in set, 1 warning (0.00 sec) How to repeat: See above. Suggested fix: Add table_schema attribute to table element in JSON EXPLAIN output.