Re: profiling plpgsql functions..

From: <mallah(at)trade-india(dot)com>
To: <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: profiling plpgsql functions..
Date: 2003-04-29 15:56:08
Message-ID: 1066.219.65.230.214.1051631768.squirrel@mail.trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)trade-india(dot)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/

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-04-29 16:01:35 Re: profiling plpgsql functions..
Previous Message mallah 2003-04-29 15:48:57 Re: Is 292 inserts/sec acceptable performance ?