Re: timing != log duration

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: timing != log duration
Date: 2012-03-21 14:11:22
Message-ID: 29855.1332339082@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no> writes:
> I am wondering why the time reported by \timing in psql is not the same
> as the time reported by duration in the log file when log_duration or
> log_min_duration_statement are on?

Network transmission delays, perhaps? psql reports the elapsed time
seen at the client, which is necessarily going to be somewhat more than
the time taken by the server.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2012-03-21 14:32:26 Re: set autovacuum=off
Previous Message Andy Colson 2012-03-21 13:44:29 Re: DBD-Pg prepared statement versus plain execution