Re: Determine query run-time from pg_* tables - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Determine query run-time from pg_* tables
Date
Msg-id 20071023134356.GJ5772@alvh.no-ip.org
Whole thread Raw
In response to Determine query run-time from pg_* tables  (Ow Mun Heng <Ow.Mun.Heng@wdc.com>)
Responses Re: Determine query run-time from pg_* tables
List pgsql-general
Ow Mun Heng wrote:
> Hi,
>
> Is there a method to obtain the query's runtime from any of the pg_*
> tables?

No.  You can use log_durations and log_statement for that.  We don't
store that info in tables.

> Right now, I'm only seeing the backend_start_time (from
> pg_stat_activity) (and I'm also not sure how to interpret this.

This is the time that the session was started.  Nothing to do with the
query itself.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Bitmap Heap scan 8.1/8.2
Next
From: Alvaro Herrera
Date:
Subject: Re: autovacuum and locks