Back to VisualizerSQL Explain Example
mysql

MySQL Join with Index

An optimized MySQL join using index lookups (ref).

SELECT * FROM users u JOIN orders o ON u.id = o.user_id WHERE u.status = "active";

This is an efficient join plan. MySQL starts with table "u" (using idx_status), and for each matching row, performs an index lookup in table "o" (using idx_user_id) where the user_id matches. The "ref" type confirms an index lookup.

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