pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Statement duration reporting
2+ messages / 2 participants
[nested] [flat]

* Statement duration reporting
@ 2006-02-09 15:13 Erik G. Burrows <erik@erikburrows.com>
  2006-02-11 16:23 ` Re: Statement duration reporting Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Erik G. Burrows @ 2006-02-09 15:13 UTC (permalink / raw)
  To: pgsql-admin

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Statement duration reporting
  2006-02-09 15:13 Statement duration reporting Erik G. Burrows <erik@erikburrows.com>
@ 2006-02-11 16:23 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2006-02-11 16:23 UTC (permalink / raw)
  To: Erik G. Burrows <erik@erikburrows.com>; +Cc: pgsql-admin

"Erik G. Burrows" <erik@erikburrows.com> writes:
> 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?

The former.  The server has no way to measure transit times.

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

There's a current thread in the pgsql-odbc list about similar issues
seen with ODBC.  I doubt its the same problem, because it's different
client software on a different OS, but maybe it'd be worth comparing
notes.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-02-11 16:23 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-02-09 15:13 Statement duration reporting Erik G. Burrows <erik@erikburrows.com>
2006-02-11 16:23 ` Tom Lane <tgl@sss.pgh.pa.us>

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