Re: [PERFORM] Getting time of a postgresql-request

2009-08-18 Thread Pierre Frédéric Caillau d
On Tue, 18 Aug 2009 06:25:57 +0200, Russell Smith wrote: Kai Behncke wrote: 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?

Re: [PERFORM] Getting time of a postgresql-request

2009-08-17 Thread Russell Smith
Kai Behncke wrote: > > 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? > $time = microtime() $result = pg_result($quer

[PERFORM] Getting time of a postgresql-request

2009-08-17 Thread Kai Behncke
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_e