Re: Getting time of a postgresql-request

From: Russell Smith <mr-russ(at)pws(dot)com(dot)au>
To: Kai Behncke <Kai-Behncke(at)gmx(dot)de>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Getting time of a postgresql-request
Date: 2009-08-18 04:25:57
Message-ID: 4A8A2D55.6050108@pws.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2009-08-18 04:33:01 Re: Memory reporting on CentOS Linux
Previous Message Scott Carey 2009-08-18 02:35:28 Re: Memory reporting on CentOS Linux