Re: IMMUTABLE STABLE functions, daily updates

Поиск
Список
Период
Сортировка
От Thom Brown
Тема Re: IMMUTABLE STABLE functions, daily updates
Дата
Msg-id CAA-aLv6HcRvYLHcHYuw2YY4Tfx+zBn5f6WsmGEzjSJSxPMErtg@mail.gmail.com
обсуждение исходный текст
Ответ на IMMUTABLE STABLE functions, daily updates  (Sorin Dudui <sd@wigeogis.com>)
Ответы Re: IMMUTABLE STABLE functions, daily updates  (Craig Ringer <ringerc@ringerc.id.au>)
Список pgsql-performance
On 10 November 2011 13:05, Sorin Dudui <sd@wigeogis.com> wrote:
> Hi,
>
>
>
> I have some functions that select data from tables which are daily or
> monthly updated.  My functions are marked as STABLE. I am wondering if they
> perform better if I mark they as IMMUTABLE?

No.  IMMUTABLE is only appropriate when there is no access to table
data from within the function.  An example of IMMUTABLE functions
would be  mathematical operations, where only the inputs and/or
function constants are used to produce a result.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Sorin Dudui
Дата:
Сообщение: IMMUTABLE STABLE functions, daily updates
Следующее
От: Jay Levitt
Дата:
Сообщение: Re: Subquery in a JOIN not getting restricted?