PostgreSQL
 sql >> Database >  >> RDS >> PostgreSQL

Ottieni il tempo di esecuzione della query PostgreSQL

Se intendi in psql, piuttosto che in qualche programma che stai scrivendo, usa \? per l'aiuto, e vedere:

\timing [on|off]       toggle timing of commands (currently off)

E poi ottieni un output come:

# \timing on
Timing is on.

# select 1234;        
 ?column? 
----------
     1234
(1 row)

Time: 0.203 ms