On Tuesday 26 Nov 2002 1:54 pm, Rison, Stuart wrote:
> Hi,
>
> I'm trying to time a pl/sql function using a rougn and ready method,
> basically: print a TIMESTAMP at the begining of the function, print a
> TIMESTAMP at the end of the function.
[snip]
> Gives me:
>
> testdb2=# select timer();
> NOTICE:  Start: 2002-11-26 13:40:14.116605+00
> NOTICE:  End: 2002-11-26 13:40:14.116605+00

> I've tried all sorts of variations but I hit one of two problems; either
> the TIMESTAMP is fixed to the function compile time or, as above, the
> timer1 and timer2 TIMESTAMPs are always identical.

Try timeofday() not now(). Quite often you want the time to stay fixed for the 
length of a transaction (what now() does). In this case you don't - see the 
Functions : date/time section of the manual for details.

-- 
  Richard Huxton

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to