Mini DBA MySQL and MariaDB execution plan controls help you inspect EXPLAIN evidence for selected sessions and queries. The plan experience can include a visual diagram, EXPLAIN FORMAT=TREE output, EXPLAIN FORMAT=JSON output, a tabular operator list, an HTML export, and AI-assisted plan review.
The richest MySQL and MariaDB plan controls appear from MySQL And MariaDB Activity, where a selected session can show SQL detail and execution plan data if it was collected. Query workflows can also lead you back to Activity when the expensive statement is currently running.
Use MySQL And MariaDB Queries to identify expensive statements by duration, frequency, reads, writes, or available cost measures. Then use Activity and plan detail when the query is active or when plan evidence has been captured.
Plan availability depends on server version, permissions, SQL text, selected database, storage engine, and whether the query can be explained safely. Some statements, temporary objects, prepared statements, or permission boundaries may limit what Mini DBA can show.
The MySQL/MariaDB plan modal and activity detail can show several complementary views:
Use the diagram to understand the shape of the plan, then use Tree, JSON, and Operators to capture precise evidence. The same problem may be easier to see in different views. For example, JSON can expose nested plan structure, while the Operators table makes access type and selected keys easy to scan.
MySQL and MariaDB plans do not expose the same estimated cost model as SQL Server, so focus on access patterns, rows, filters, and Extra values. In the Operators tab, look for rows where the access type indicates broad scanning or weak selectivity, especially when rows is large and filtered percent is low.
Investigate:
ALL access on large tables when a selective predicate should use an index.index scans that read many index entries rather than seeking to a narrow range.Access type alone is not enough. A table scan on a tiny lookup table may be fine, while a range scan on a huge table can still be expensive. Compare the plan with runtime symptoms from MySQL And MariaDB Activity, MySQL And MariaDB I/O, and MySQL And MariaDB InnoDB.
Common tuning actions include adding or changing indexes, rewriting predicates so indexes are usable, reducing result size, changing join order through query design, removing unnecessary sorts, and checking whether statistics or table distribution has changed. For write-heavy tables, every additional index has a cost. Validate new indexes against INSERT, UPDATE, DELETE, storage, and replication impact.
If the plan points to locks or transaction delay rather than access path, use MySQL And MariaDB InnoDB and MySQL And MariaDB Deadlocks. A query can look slow because it waits, not because the plan is the root cause.
The AI Assistant tab passes available plan tree, JSON, and operators. This makes it useful for translating dense EXPLAIN output into an investigation checklist.
Useful prompts include:
Which table access pattern is the biggest concern in this MySQL execution plan?
Explain the chosen keys, possible keys, rows, filtered percentage, and Extra values.
What should I validate before adding an index for this query?
Use AI recommendations as a guide for evidence gathering. Confirm the change in a lower environment or controlled production window and compare before-and-after metrics.