Check whether the planner uses indexes, hash joins, merge joins, or nested loops.
Section: Join performance
Use EXPLAIN to inspect join strategy
sql
sql
EXPLAIN ANALYZE
SELECT c.customer_id, o.order_id
FROM customers c
JOIN orders o ON o.customer_id = c.customer_id
WHERE c.created_at >= CURRENT_DATE - INTERVAL '30 days';Explanation
Plan inspection is the fastest way to validate whether a join is cheap or expensive.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Join performance