EXPLAIN SELECT * FROM orders
WHERE user_id = 42 AND status = 'paid';
-- more detail with actual execution analysis:
EXPLAIN ANALYZE SELECT ...;ALL (full table scan); best — const, ref, eq_refALL — a problemUsing filesort and Using temporary — warning signsFind a slow query → EXPLAIN → spot the ALL scan → add an index → check EXPLAIN again.