View vs function

From: Keith Worthington <KeithW(at)NarrowPathInc(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: View vs function
Date: 2005-03-21 03:39:57
Message-ID: 423E420D.1020503@NarrowPathInc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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
be faster? Or does the planner realize all this...

SELECT * FROM view_big_query WHERE column1 = 1234;

SELECT * FROM func_bug_query(1234);

--
Kind Regards,
Keith

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Stark 2005-03-21 03:47:43 Re: What needs to be done for real Partitioning?
Previous Message Greg Stark 2005-03-21 03:33:12 Re: What needs to be done for real Partitioning?