EXPLAIN shows PostgreSQL's query execution plan — how it will run a query (which scans, joins, indexes). EXPLAIN ANALYZE actually runs the query and shows real timing and row counts. These are the primary tools for diagnosing slow queries.
EXPLAIN — the plan (without running)
EXPLAIN orders customer_id ;
