Re: unexpected stable function behavior

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: unexpected stable function behavior
Дата
Msg-id 201103141508.15229.andres@anarazel.de
обсуждение исходный текст
Ответ на unexpected stable function behavior  (Julius Tuskenis <julius@nsoft.lt>)
Список pgsql-performance
On Thursday, March 10, 2011 05:26:00 PM Julius Tuskenis wrote:
> 3) As STABLE function should be executed once for every different set of
> parameters
Thats not true. Thats not what any of the volatility information (like STABLE,
IMMUTABLE, VOLATILE) does.

See http://www.postgresql.org/docs/current/interactive/xfunc-volatility.html

It *does* change how often a function is executed though. I.e.

SELECT g.i, some_stable_func(1) FROM generate_series(1, 1000) g(i)

will call some_stable_func only once because it can determine all the
parameters beforehand.


Andres

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: unexpected stable function behavior
Следующее
От: Claudio Freire
Дата:
Сообщение: Re: Performance regression from 8.3.7 to 9.0.3