Re: [GENERAL] query not scaling

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] query not scaling
Дата
Msg-id 30441.1509030087@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [GENERAL] query not scaling  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: [GENERAL] query not scaling  (Rob Sargent <robjsargent@gmail.com>)
Re: [GENERAL] query not scaling  (Rob Sargent <robjsargent@gmail.com>)
Re: [GENERAL] query not scaling  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> Also, to have PostgreSQL inline the function, which would be good
> for performance, it should be declared IMMUTABLE.

Actually, if you hope to have a SQL function be inlined, it's better
not to decorate it at all --- not with IMMUTABLE, and not with STRICT
either.  Both of those restrict the parser's ability to inline unless
it can prove the contained expression is equally immutable/strict.
With the default attributes of volatile/not strict, there's nothing
to prove.

(In any case, it's usually easy enough to tell from EXPLAIN output
whether inlining has happened.)
        regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Marcio Farah
Дата:
Сообщение: [GENERAL] Function
Следующее
От: Rob Sargent
Дата:
Сообщение: Re: [GENERAL] query not scaling