Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql
Дата
Msg-id 5442.1065651752@sss.pgh.pa.us
обсуждение исходный текст
Ответ на IMMUTABLE function's flag do not work: 7.3.4, plpgsql  (Andriy Tkachuk <ant@imt.com.ua>)
Ответы Re: IMMUTABLE function's flag do not work: 7.3.4, plpgsql  (Andriy Tkachuk <ant@imt.com.ua>)
Список pgsql-performance
Andriy Tkachuk <ant@imt.com.ua> writes:
> At second. calc_total() is immutable function:
> but it seems that it's not cached in one session:

It's not supposed to be.

The reason the "runtime" is small in your example is that the planner
executes the function call while preparing the plan, and this isn't
counted in EXPLAIN's runtime measurement.  There's no claim anywhere
that the results of such an evaluation would be saved for other plans.

            regards, tom lane

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: Presentation
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Compare rows