Re: Amazing performance failure with SQL function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jd(at)commandprompt(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Amazing performance failure with SQL function
Date: 2009-11-18 22:43:48
Message-ID: 28432.1258584228@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Joshua D. Drake" <jd(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joachim Wieland 2009-11-18 23:59:42 Re: Listen / Notify - what to do when the queue is full
Previous Message Tom Lane 2009-11-18 22:32:52 Re: Oversight in CREATE FUNCTION + EXPLAIN?