Skip site navigation (1) Skip section navigation (2)

Re: timing != log duration

From: Marti Raudsepp <marti(at)juffo(dot)org>
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 11:53:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Wed, Mar 21, 2012 at 13:42, Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no> wrote:
> 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?

psql's \timing measures time on the client -- which includes the
network communication time (time to send the query to the server, and
receive back the results)

log_min_duration_statement measures time on the server, so it doesn't
know how long network transmission takes.


In response to

pgsql-performance by date

Next:From: ktm@rice.eduDate: 2012-03-21 12:59:30
Subject: Re: DBD-Pg prepared statement versus plain execution
Previous:From: Rafael MartinezDate: 2012-03-21 11:42:00
Subject: timing != log duration

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group