\timing

Category: Databases & SQL

\timing

Toggle query execution timing

After \timing, psql prints how long each statement took to run, which helps spot slow queries. \timing on and \timing off both work. Pair it with EXPLAIN ANALYZE to see where the time goes.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.