Getting time of a postgresql-request - Mailing list pgsql-performance

From Kai Behncke
Subject Getting time of a postgresql-request
Date
Msg-id 20090817163813.167650@gmx.net
Whole thread Raw
Responses Re: Getting time of a postgresql-request  (Russell Smith <mr-russ@pws.com.au>)
Number of tables  (Fabio La Farcioli <fabio.lafarcioli@molinoalimonti.com>)
List pgsql-performance
Dear users,

I try to optimize the time of my Postgresql-requests, but for that, the first step,
I of course need to get that time.

I know that with:

EXPLAIN ANALYSE SELECT bundesland from
 bundesland WHERE ST_Contains(the_geom, $punktgeometrie_start) AND
 ST_Contains(the_geom, $punktgeometrie_ende)

I can get that time on command line.

But I would like to get it in a php-script, like

$timerequest_result=pg_result($timerequest,0);

(well, that does not work).

I wonder: Is there another way to get the time a request needs?
How do you handle this?

Thank you very much, Kai

--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

pgsql-performance by date:

Previous
From: Matthew Wakeling
Date:
Subject: Re: Memory reporting on CentOS Linux
Next
From: Jeremy Carroll
Date:
Subject: Re: Memory reporting on CentOS Linux