[PERFORM] View vs function

2005-03-20 Thread Keith Worthington
Hi All, I have been reading about set returning functions. What I would like to know is is there a performance advantage in using SRFs versus querying a view. Assuming the underlying SQL is the same for the view vs the function except for the WHERE clause which of these would you expect to

Re: [PERFORM] View vs function

2005-03-20 Thread Bruno Wolff III
On Sun, Mar 20, 2005 at 22:39:57 -0500, Keith Worthington [EMAIL PROTECTED] wrote: Hi All, I have been reading about set returning functions. What I would like to know is is there a performance advantage in using SRFs versus querying a view. Assuming the underlying SQL is the same for

Re: [PERFORM] View vs function

2005-03-20 Thread Tom Lane
Neil Conway [EMAIL PROTECTED] writes: Bruno Wolff III wrote: Functions are just black boxes to the planner. ... unless the function is a SQL function that is trivial enough for the planner to inline it into the plan of the invoking query. Currently, we won't inline set-returning SQL