pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rafael Martinez <r.m.guerrero@usit.uio.no>
To: pgsql-performance@postgresql.org
Subject: timing != log duration
Date: Wed, 21 Mar 2012 12:42:00 +0100
Message-ID: <4F69BE88.30905@usit.uio.no> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello

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?. I can not find any information about
this in the documentation.

e.g.
- -----------------------------------
ver=# SELECT * from version ;
Time: 0.450 ms

2012-03-20 16:10:16 CET 29119 LOG:  duration: 0.313 ms  statement:
SELECT * from version ;
- -----------------------------------

ver=# PREPARE foo AS SELECT * from version ;
PREPARE
Time: 0.188 ms

ver=# EXECUTE foo;
Time: 0.434 ms

ver=# DEALLOCATE foo;
DEALLOCATE
Time: 0.115 ms

2012-03-20 16:12:21 CET 29119 LOG:  duration: 0.127 ms  statement:
PREPARE foo AS SELECT * from version ;
2012-03-20 16:12:37 CET 29119 LOG:  duration: 0.303 ms  statement:
EXECUTE foo;
2012-03-20 16:13:24 CET 29119 LOG:  duration: 0.055 ms  statement:
DEALLOCATE foo;
- -----------------------------------

Thanks in advance
regards,
- -- 
 Rafael Martinez Guerrero
 Center for Information Technology
 University of Oslo, Norway

 PGP Public Key: http://folk.uio.no/rafael/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9pvoUACgkQBhuKQurGihRf3gCfRMv5dQnNA8f/gjcPMv6OPrGz
qHoAn0PPgN1OYMBDQqJes3kRBxH//Y95
=rsAY
-----END PGP SIGNATURE-----



view thread (4+ messages)  latest in thread

Message-ID: <4F69BE88.30905@usit.uio.no>
Permalink:  ../4F69BE88.30905@usit.uio.no/
Also on:    postgresql.org/message-id/4F69BE88.30905@usit.uio.no

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: r.m.guerrero@usit.uio.no
  Subject: Re: timing != log duration
  In-Reply-To: <4F69BE88.30905@usit.uio.no>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox