EXPLAIN shows how the database executes your query. Learn to read it to find performance issues.
Key things to look for:
- Seq Scan: Full table scan (often bad for large tables)
- Index Scan: Using an index (usually good)
- Index Only Scan: Even better, no table access
- Rows: Estimated rows processed
- Cost: Relative cost units
Run EXPLAIN ANALYZE to see actual vs estimated rows. Large differences indicate stale statistics.