Re: Views and functions returning sets of records

Поиск
Список
Период
Сортировка
От Giorgio Valoti
Тема Re: Views and functions returning sets of records
Дата
Msg-id D49B7437-F5A9-44FC-807F-C8472C059B2B@mac.com
обсуждение исходный текст
Ответ на Re: Views and functions returning sets of records  (Andreas Kretschmer <akretschmer@spamfence.net>)
Ответы Re: Views and functions returning sets of records
Список pgsql-performance
On 22/mar/08, at 17:55, Andreas Kretschmer wrote:

> Tom Lane <tgl@sss.pgh.pa.us> schrieb:
>
>> Giorgio Valoti <giorgio_v@mac.com> writes:
>>> maybe it’s a naive question but I was wondering if there is any
>>> difference, from a performance point of view, between a view and a
>>> function performing the same task,
>>
>> Yes.  Usually the view will win.
>
> *smile*

:-(
I was thinking about using using functions as the main way to
interact with the database from an external application. The
(supposed) rationale was to simplify the application code: you only
have to worry about in and out function parameters.
Are there any way to pass some hints to the planner? For example,
could the IMMUTABLE/STABLE/VOLATILE modifiers be of some help?


Thank you
--
Giorgio Valoti





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

Предыдущее
От: Andreas Kretschmer
Дата:
Сообщение: Re: Views and functions returning sets of records
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Views and functions returning sets of records