Re: Getting time of a postgresql-request

Поиск
Список
Период
Сортировка
От Russell Smith
Тема Re: Getting time of a postgresql-request
Дата
Msg-id 4A8A2D55.6050108@pws.com.au
обсуждение исходный текст
Ответ на Getting time of a postgresql-request  ("Kai Behncke" <Kai-Behncke@gmx.de>)
Ответы Re: Getting time of a postgresql-request  (Pierre Frédéric Caillaud<lists@peufeu.com>)
Список pgsql-performance
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($query);
echo "Time to run query and return result to PHP: ".(microtime() - $time);

Something like that.

Regards

Russell

В списке pgsql-performance по дате отправления:

Предыдущее
От: Scott Carey
Дата:
Сообщение: Re: Memory reporting on CentOS Linux
Следующее
От: Greg Smith
Дата:
Сообщение: Re: Memory reporting on CentOS Linux