Re: Performance analysis of plpgsql code - Mailing list pgsql-performance

From Michael Fuhr
Subject Re: Performance analysis of plpgsql code
Date
Msg-id 20050628013419.GA17407@winnie.fuhr.org
Whole thread Raw
In response to Re: Performance analysis of plpgsql code  ("Karl O. Pinc" <kop@meme.com>)
Responses Re: Performance analysis of plpgsql code
List pgsql-performance
On Tue, Jun 28, 2005 at 01:54:08AM +0000, Karl O. Pinc wrote:
> On 06/27/2005 06:33:03 PM, Michael Fuhr wrote:
>
> >See timeofday().
>
> That only gives you the time at the start of the transaction,
> so you get no indication of how long anything in the
> transaction takes.

Did you read the documentation or try it?  Perhaps you're thinking
of now(), current_timestamp, and friends, which don't advance during
a transaction; but as the documentation states, "timeofday() returns
the wall-clock time and does advance during transactions."

I just ran tests on versions of PostgreSQL going back to 7.2.8 and
in all of them timeofday() advanced during a transaction.  Does it
not work on your system?  If not then something's broken -- what
OS and version of PostgreSQL are you using?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

pgsql-performance by date:

Previous
From: Leigh Dyer
Date:
Subject: Faster drives for WAL than for data?
Next
From: "Karl O. Pinc"
Date:
Subject: Re: Poor index choice -- multiple indexes of the same