pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Erik G. Burrows <erik@erikburrows.com>
To: pgsql-admin@postgresql.org
Subject: Statement duration reporting
Date: Thu, 09 Feb 2006 07:13:16 -0800
Message-ID: <1139497996.15057.11.camel@localhost> (raw)

Hello All,
I'm running PostgreSQL 7.4.7 (Debian package 7.4.7-6sarge1) on an AMD
Opteron system wth Debian 3.1.

In analyzing performance for this database, by logging statements with
duration timing, I have many statements that are taking far longer to
run than they should. For example, inserts into a 400MB table with three
indexes and no triggers that take up to 70ms. 

When I execute the exact same statement in psql (rather than the web
application, which is written in PHP on a separate machine, but on the
same network), the statement takes the expected 1ms, reported both with
the \timing psql command, and in the serverlog.

So, my question is: What does the duration time in the serverlog
reflect? Is it just the time the server took to execute the statement,
or does it reflect also query receive and response transmit time?

Any other ideas as to why I'm seeing these odd and contradictory times?

Thanks,
  Erik G. Burrows





view thread (2+ messages)  latest in thread

Message-ID: <1139497996.15057.11.camel@localhost>
Permalink:  ../1139497996.15057.11.camel@localhost/
Also on:    postgresql.org/message-id/1139497996.15057.11.camel@localhost

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: erik@erikburrows.com
  Subject: Re: Statement duration reporting
  In-Reply-To: <1139497996.15057.11.camel@localhost>
  References: <1139497996.15057.11.camel@localhost>

* 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