Re: profiling plpgsql functions.. - Mailing list pgsql-performance

From
Subject Re: profiling plpgsql functions..
Date
Msg-id 1066.219.65.230.214.1051631768.squirrel@mail.trade-india.com
Whole thread Raw
In response to Re: profiling plpgsql functions..  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: profiling plpgsql functions..  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
Yep timeofday returns text , but is there anything else
that equivalant that can be differenced inside plpgsql
so that i can print the not of secs/millisecs connsumed?

hmm shud i cast timeofday to timestamp  and use timestamp
arithmatic ?

regds
mallah.

> Rajesh Kumar Mallah <mallah@trade-india.com> writes:
>> Is printing timeofday() at various points a good idea
>> of profiling plpgsql functions?
>
> Sure.
>
>> also is anything wrong with following fragment ?
>> RAISE INFO '' % , message here ... '' , timeofday() ;
>
> IIRC, RAISE is pretty slovenly implemented :-( ... it will only take plain variable references
> as additional arguments.  So you'll have to do
>
>         var := timeofday();
>         RAISE INFO ''... '', var;
>
> I believe timeofday() produces TEXT, so declare the var that way.
>
>             regards, tom lane



-----------------------------------------
Get your free web based email at trade-india.com.
   "India's Leading B2B eMarketplace.!"
http://www.trade-india.com/


pgsql-performance by date:

Previous
From:
Date:
Subject: Re: Is 292 inserts/sec acceptable performance ?
Next
From: Tom Lane
Date:
Subject: Re: profiling plpgsql functions..