Re: View vs Stored Proc Performance

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: View vs Stored Proc Performance
Дата
Msg-id b42b73150909111037g45c715dft34c4c007fd26c535@mail.gmail.com
обсуждение исходный текст
Ответ на View vs Stored Proc Performance  (Jason Tesser <jasontesser@gmail.com>)
Ответы Re: View vs Stored Proc Performance
Список pgsql-performance
On Fri, Sep 11, 2009 at 11:46 AM, Jason Tesser <jasontesser@gmail.com> wrote:
> Is it faster to use a Stored Proc that returns a Type or has Out Parameters
> then a View?  Views are easier to maintain I feel.  I remember testing this
> around 8.0 days and the view seemed slower with a lot of data.

for the most part, a view can be faster and would rarely be slower.
Views are like C macros for you query...they are expanded first and
then planned.  Functions (except for very simple ones) are black boxes
to the planner and can materially hurt query performance in common
cases.  The only case where a function would win is when dealing with
conner case planner issues (by forcing a nestloop for example).

merlin

В списке pgsql-performance по дате отправления:

Предыдущее
От: Alan McKay
Дата:
Сообщение: odd iostat graph
Следующее
От: Scott Carey
Дата:
Сообщение: Re: odd iostat graph