Search Postgresql Archives

Re: Explaining functions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Heeeey the raise notice is a good idea, thanks. I use raise notice
already for other uses, may as well go with it. Thanks.


Matthew Hartman
Programmer/Analyst
Information Management, ICP
Kingston General Hospital
(613) 549-6666 x4294 
 

-----Original Message-----
From: Merlin Moncure [mailto:mmoncure@xxxxxxxxx] 
Sent: Tuesday, June 23, 2009 9:20 AM
To: Hartman, Matthew
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re:  Explaining functions.

On Tue, Jun 23, 2009 at 8:03 AM, Hartman,
Matthew<Matthew.Hartman@xxxxxxxxxx> wrote:
> Is there a recommended approach when trying to use EXPLAIN on a
> function? Specifically, a function that is more than the typical
SELECT
> statement or tiny loop. The one in question that I'm hoping to
optimize
> is around 250 lines.

What I normally do for benchmarking of complex functions is to
sprinkle the source with "raise notice '%', timeofday();" to figure
out where the bottlenecks are.  Following that, I micro-optimize
problem queries or expressions outside of the function body in psql.

merlin


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux