Re: Amazing performance failure with SQL function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Amazing performance failure with SQL function
Date
Msg-id 28432.1258584228@sss.pgh.pa.us
Whole thread Raw
In response to Amazing performance failure with SQL function  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
"Joshua D. Drake" <jd@commandprompt.com> writes:
> This is repeatable. I expect a little regression because we have to
> compile the SQL but 14 seconds? 

generate_series is a quite efficient C function.  I think it's pretty
damn good that the overhead of a SQL function on top of that is only 2X.

Or were you expecting the SRF to be inlined?  If so, you need to
(a) be using 8.4, (b) mark it STABLE or IMMUTABLE.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Oversight in CREATE FUNCTION + EXPLAIN?
Next
From: Joachim Wieland
Date:
Subject: Re: Listen / Notify - what to do when the queue is full