Profiling a function... - Mailing list pgsql-performance

From Robert Sanford
Subject Profiling a function...
Date
Msg-id 8343824939973D4FAC4AD93C1CF35944013A4147@orrtax_exchg3.nls.nlsholdings.com
Whole thread Raw
Responses Re: Profiling a function...
List pgsql-performance
How do I profile a user-defined function so that I know which parts of the
function are the ones that are taking the biggest chunk of time?

When I run EXPLAIN on the queries within the function none of them show up
as onerous burdens to the performance. But when they are all operating
together within the function and within the functional logic they become
really expensive. Obviously I've made a mistake somewhere but it isn't
obvious (otherwise it would be fixed already) and I'd prefer having a
profile report telling me what is taking so long rather than guessing and
possibly making things worse.

So is there any way to get a line-by-line timing profile of a user-defined
function?

Thanks!

rjsjr

pgsql-performance by date:

Previous
From: Greg Stark
Date:
Subject: Re: [SQL] OFFSET impact on Performance???
Next
From: Richard Huxton
Date:
Subject: Re: Profiling a function...