Re: [GENERAL] Explaining functions.

2009-06-26 Thread Greg Smith
On Tue, 23 Jun 2009, Hartman, Matthew 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. Take a look at http

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Hartman, Matthew
Sent: Tuesday, June 23, 2009 10:48 AM To: Hartman, Matthew; 'Merlin Moncure' Cc: pgsql-general@postgresql.org Subject: RE: [GENERAL] Explaining functions. > > is around 250 lines. > > What I normally do for benchmarking of complex functions is to > sprinkle the source wit

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Chris Spotts
> > 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

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Dave Page
On Tue, Jun 23, 2009 at 3:04 PM, Tom Lane wrote: > Merlin Moncure writes: >> On Tue, Jun 23, 2009 at 8:03 AM, Hartman, >> Matthew 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

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Tom Lane
Merlin Moncure writes: > On Tue, Jun 23, 2009 at 8:03 AM, Hartman, > Matthew 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 optimi

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Hartman, Matthew
[mailto:mmonc...@gmail.com] Sent: Tuesday, June 23, 2009 9:20 AM To: Hartman, Matthew Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] Explaining functions. On Tue, Jun 23, 2009 at 8:03 AM, Hartman, Matthew wrote: > Is there a recommended approach when trying to use EXPLAIN on a > fu

Re: [GENERAL] Explaining functions.

2009-06-23 Thread Merlin Moncure
On Tue, Jun 23, 2009 at 8:03 AM, Hartman, Matthew 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

[GENERAL] Explaining functions.

2009-06-23 Thread Hartman, Matthew
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. Thanks, Matthew Hartman Programmer/Analyst Information Management, I