Re: How to get the used time when operate a select query?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: nconway(at)klamath(dot)dyndns(dot)org (Neil Conway)
Cc: Oskar Berggren <beo(at)sgs(dot)o(dot)se>, pgsql-general(at)postgresql(dot)org
Subject: Re: How to get the used time when operate a select query?
Date: 2002-06-27 15:44:43
Message-ID: 26150.1025192683@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

nconway(at)klamath(dot)dyndns(dot)org (Neil Conway) writes:
> BTW in 7.3, you'll be able to do "\timing" inside psql to enable
> client-side timing. i.e.

> nconway=# select 1;
> ?column?
> ----------
> 1
> (1 row)

> Total time: 0.001s

Why is the precision of the display restricted to milliseconds?
Clock readings are usually good to a few microseconds on modern
machines.

I'd suggest showing the result in the same format used by EXPLAIN
ANALYZE, which is milliseconds with a fractional part.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message mordicus 2002-06-27 16:03:17 Re: pg_dump / consistent snapshot / backup
Previous Message Jan Wieck 2002-06-27 15:27:33 Re: Shared Memory Sizing