Re: Immutable function WAY slower than Stable function?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Immutable function WAY slower than Stable function?
Дата
Msg-id 17961.1533597095@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Immutable function WAY slower than Stable function?  (Ken Tanzer <ken.tanzer@gmail.com>)
Ответы Re: Immutable function WAY slower than Stable function?  (Ken Tanzer <ken.tanzer@gmail.com>)
Список pgsql-general
Ken Tanzer <ken.tanzer@gmail.com> writes:
> Hi.  I was recently troubleshooting a function, and realized it had
> incorrectly been declared as Immutable, when it should have been declared
> Stable.  When I changed it to Stable, the query I was running ran
> dramatically faster. Digging into this a little more, this is what I found:

EXPLAIN VERBOSE might shed a bit more light.  I suspect you're falling
foul of the rather arcane rules about whether a SQL function can be
inlined.  (Although it seems like only the wrapper function would be
inline-able anyway, so I'm not sure why the penalty is that high.)

            regards, tom lane


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

Предыдущее
От: Ken Tanzer
Дата:
Сообщение: Immutable function WAY slower than Stable function?
Следующее
От: Ken Tanzer
Дата:
Сообщение: Re: Immutable function WAY slower than Stable function?