Re: View vs Stored Proc Performance

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: View vs Stored Proc Performance
Дата
Msg-id b42b73150909111453l73467547j485aa6d90f68fa99@mail.gmail.com
обсуждение исходный текст
Ответ на Re: View vs Stored Proc Performance  (Jason Tesser <jasontesser@gmail.com>)
Ответы Re: View vs Stored Proc Performance  (Dimitri Fontaine <dfontaine@hi-media.com>)
Список pgsql-performance
On Fri, Sep 11, 2009 at 5:27 PM, Jason Tesser <jasontesser@gmail.com> wrote:
> Right what I was wondering is is this better done in a view? or a stored
> proc?   I am guessing based on your initial response the view is better
> performance.  These are the types of queries I will be doing though.
>

in performance terms the view should be faster if you are doing things
like joining the result to another table...the planner can see
'through' the view, etc.  in a function, the result is fetched first
and materialized without looking at the rest of the query.  the actual
mechanism you use to build the arrays is likely going to be more
important than anything else.

merlin

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: slow query : very simple delete, 100% cpu, nearly no disk activity
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: slow query : very simple delete, 100% cpu, nearly no disk activity