From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Mike Mascari <mascarm(at)mascari(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: 7.4 in-lining of SQL functions |
Date: | 2004-10-15 05:02:15 |
Message-ID: | 5116.1097816535@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Mike Mascari <mascarm(at)mascari(dot)com> writes:
> "Simple SQL functions can now be inlined by including their SQL in the
> main query. This improves performance by eliminating per-call overhead.
> That means simple SQL functions now behave like macros."
> has me a bit worried. What does "simple" mean?
Not anything involving UNION :-(
The basic intent of the current inlining facility is to support inlining
of functions that return scalar results. I think that it punts entirely
for functions that return SETOF anything; it certainly shouldn't be
expected to do amazing feats of query optimization for them...
You would probably have better results using views, if you can express
your problems using views. Those do get "inlined" pretty well.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2004-10-15 06:58:42 | Re: Has anyone tried Date/Darwen/Lorentzos's model for temporal data? |
Previous Message | Jaromir Dolecek | 2004-10-15 04:48:40 | Re: 'NOW' in UTC with no timezone |