Re: profiling plpgsql functions..

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: profiling plpgsql functions..
Date: 2003-04-29 14:27:55
Message-ID: 26413.1051626475@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2003-04-29 14:53:13 Re: Query Plan far worse in 7.3.2 than 7.2.1
Previous Message Tom Lane 2003-04-29 14:18:19 Re: Optimizer not using index when it should