how to use \timing in postgres
问题 I want to know the time that it takes to execute a query in Postgres, I see a lot of response that propose to use \timing, but I'm newbie in Postgres and I don't know how to use it, can anyone help thank you in advance 回答1: You can use \timing only with the command line client psql , since this is a psql command. It is a switch that turns execution time reporting on and off: test=> \timing Timing is on. test=> SELECT 42; ┌──────────┐ │ ?column? │ ├──────────┤ │ 42 │ └──────────┘ (1 row) Time: