Re: SQL code runs slower as a stored function - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: SQL code runs slower as a stored function
Date
Msg-id 4BEC2362.2080104@iol.ie
Whole thread Raw
In response to SQL code runs slower as a stored function  (S G <sgennaria2@gmail.com>)
Responses Re: SQL code runs slower as a stored function  (S G <sgennaria2@gmail.com>)
List pgsql-general
On 13/05/2010 16:59, S G wrote:

> Can anyone lend a guess as to what I'm running into here, or do I need
> to provide more specifics to recreate the issue?  It's repeatable, but
> it's a fair bit of data for me to just post in here as-is.  I've already
> discovered a few creative workarounds (e.g. plpgsql: return query
> execute ...) that make it run faster again, but at this point, I'm
> really more interested in finding out what would make sql code run so
> much slower as a stored function in the first place.

It would help if you post the output from EXPLAIN ANALYZE for each case,
as this will hopefully show where the bottleneck is.

Ray.


--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

pgsql-general by date:

Previous
From: "I. B."
Date:
Subject: Re: Persistence problem
Next
From: Stephen Frost
Date:
Subject: Re: SQL code runs slower as a stored function