Statement duration reporting

From: "Erik G(dot) Burrows" <erik(at)erikburrows(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Statement duration reporting
Date: 2006-02-09 15:13:16
Message-ID: 1139497996.15057.11.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tomeh, Husam 2006-02-09 20:04:04 Upgrading O/S requires Postgres re-build?
Previous Message Tom Lane 2006-02-09 14:09:45 Re: Schema search for default operator classes (was: [ADMIN] Cross schema Primary Key Indexes problem with datatype in the public schema)