[MDEV-27294] Implement EXPLAIN for SHOW Created: 2019-09-30 Updated: 2021-12-17 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Admin statements, Information Schema, Optimizer |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | statement_explain, statement_show | ||
| Issue Links: |
|
||||||||
| Description |
|
EXPLAIN currently supports SELECT queries that target information_schema tables. For example, these queries are valid:
Sometimes this functionality is very important, because innocent-looking SELECT queries that target information_schema tables can actually cause serious performance issues. For example, see here: https://dev.mysql.com/doc/refman/5.7/en/information-schema-optimization.html However, one problem is that if we convert the above SELECT queries to their equivalent SHOW queries, then EXPLAIN fails. For example:
Some of these SHOW queries can probably have similar problems as SELECT queries that target information_schema tables. If so, then wouldn't it make sense to implement EXPLAIN for them as well? |