Back to VisualizerSQL Explain Example
mysql
MySQL Derived Table
Querying a subquery in the FROM clause.
SELECT avg_amt FROM (SELECT AVG(amount) as avg_amt FROM orders) AS deriv;MySQL materializes the subquery in the FROM clause into a derived table (often in memory) before querying it.
Interactive Execution Plan
EXPLAIN Output
Run: EXPLAIN FORMAT=JSON your_query; or EXPLAIN your_query;Enter SQL EXPLAIN output to visualizeSupports PostgreSQL EXPLAIN ANALYZE, MySQL EXPLAIN, and SQLite EXPLAIN QUERY PLAN formats