MySQL Query Plan
View: diagram
Total: 8.25 ms
Operators: 3
Export SVG
Export Analysis JSON
Print / PDF
MySQL Query Plan
Execution plan (left → right) · Total: 8.25 ms · Darker = slower · Click node to pin details
Search
Click a node to pin details · +/− to zoom · Drag to pan · Dbl-click to reset · Ctrl+F to search
Table scan on users · Total: 2.54 ms · Cost: 303.50 · Rows: 3.00K · Loops: 1 · Table: users · Est.rows: 3000 · ⚠ In Query Analysis: Full table scan: users (3000 rows), orders (12000 rows)
2.54 ms
Full Table Scan
users
3.00K rows
3.00K rows
Inner hash join (orders.user_id = users.id) · Total: 8.25 ms · Self: 1.90 ms · Cost: 1025.50 · Rows: 12.00K · Loops: 1 · ⚠ In Query Analysis: 1 hash join(s) — uses join_buffer_size (~12000 rows in build phase)
1.90 ms
hash join
12.00K rows
Table scan on orders (hash build) · Total: 3.81 ms · Cost: 1191.40 · Rows: 12.00K · Loops: 1 · Table: orders · Est.rows: 11834 · ⚠ In Query Analysis: Full table scan: users (3000 rows), orders (12000 rows)
3.81 ms
Full Table Scan
orders
12.00K rows
12.00K rows
12.00K rows
Total: 8.25 ms | Cost: 1025.50
query_block #1
1.90 ms
+
−
↺
How to read · Query Analysis
Query
select u.name AS name, o.total AS total
from testdb.users u
join testdb.orders o on (o.user_id = u.id)
How to read
Left→right = execution order. Darker = more self-time. Click a node to pin details.
Where a warning applies: hover or click the node — details show “In Query Analysis”; the panel below lists the node label.
Optimizer features in this plan
hash_join=on
⚠ Warnings
Full table scan: users (3000 rows), orders (12000 rows)
→ Labeled: “Table scan [users]”, “Table scan [orders]”
1 hash join(s) — uses join_buffer_size (~12000 rows in build phase)
→ Labeled: “Inner hash join (orders.user_id = users.id)”
Suggestions
• Add indexes on filter/join columns to avoid full table scans
• Increase join_buffer_size if hash joins are slow or spill to disk
8.25 ms
Total Time
3
Operators
SQL Query
select u.name AS name, o.total AS total from testdb.users u join testdb.orders o on (o.user_id = u.id)
Optimizer Features
hash_join=on
Warnings
Full table scan: users (3000 rows), orders (12000 rows)
1 hash join(s) — uses join_buffer_size (~12000 rows in build phase)
Suggestions
Add indexes on filter/join columns to avoid full table scans
Increase join_buffer_size if hash joins are slow or spill to disk
Index Suggestions
Full Table Scans
users (3.00K rows, 1 loops)
orders (12.00K rows, 1 loops)