Re: Confirming \timing output

From: Steven Schlansker <steven(at)likeness(dot)com>
To: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Confirming \timing output
Date: 2012-08-23 18:27:56
Message-ID: CEA07360-490A-4578-8FEB-03577FC73C66@likeness.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 23, 2012, at 11:13 AM, "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com> wrote:

> With \timing set on, I run an update statement and it reports....
>
> Time: 0.524 ms
>
> Is that really 0.524 ms? As in 524 nanoseconds?

0.524ms = 524000ns

Perhaps you meant microseconds?

0.524ms = 524us

If all your data happens to be in RAM cache, simple queries can execute very fast! Unless you have a reason to believe it's wrong, I would trust it to be accurate :-)

>
> Also, is this wallclock time or some sort of indication of how much cpu it took?
>
> Thanks for any answers !
>

\timing measures wall time. There's a more detailed discussion of the difference between this and e.g. EXPLAIN ANALYZE here:

http://postgresql.1045698.n5.nabble.com/What-does-timing-measure-td4289329.html

In response to

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2012-08-23 18:30:02 Re: Confirming \timing output
Previous Message Sébastien Lorion 2012-08-23 18:24:38 Re: Amazon High I/O instances