Getting time of a postgresql-request

От: Kai Behncke
Тема: Getting time of a postgresql-request
Дата: ,
Msg-id: 20090817163813.167650@gmx.net
(см: обсуждение, исходный текст)
Ответы: Re: Getting time of a postgresql-request  (Russell Smith)
Number of tables  (Fabio La Farcioli)
Список: pgsql-performance

Скрыть дерево обсуждения

Getting time of a postgresql-request  ("Kai Behncke", )
 Re: Getting time of a postgresql-request  (Russell Smith, )
  Re: Getting time of a postgresql-request  (Pierre Frédéric Caillaud<>, )
 Number of tables  (Fabio La Farcioli, )
  Re: Number of tables  (Jochen Erwied, )
  Re: Number of tables  (Craig Ringer, )
   Re: Number of tables  (Fabio La Farcioli, )
  Re: Number of tables  (Craig James, )
   Re: Number of tables  (Greg Stark, )
    Re: Number of tables  (Craig James, )
     Re: Number of tables  (Greg Stark, )
      Re: Number of tables  (Alvaro Herrera, )
       Re: Number of tables  (Greg Stark, )
        Re: Number of tables  ("Kevin Grittner", )
       Re: Number of tables  (Robert Haas, )
      Re: Number of tables  (Jerry Champlin, )
  Re: Number of tables  (Mike Ivanov, )
   Re: Number of tables  (Greg Stark, )
    Re: Number of tables  (Mike Ivanov, )

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 по дате сообщения:

От: Slava Moudry
Дата:
Сообщение: number of rows estimation for bit-AND operation
От: Scott Carey
Дата:
Сообщение: Re: Memory reporting on CentOS Linux