When are SQL functions inlined & how can I tell?

Поиск
Список
Период
Сортировка
От J. Greg Davidson
Тема When are SQL functions inlined & how can I tell?
Дата
Msg-id 1216188915.585.1325959429206.JavaMail.root@zimbra.well.com
обсуждение исходный текст
Ответы Re: When are SQL functions inlined & how can I tell?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I've been having some serious (> 100x) slowness in some of my code
which uses nice maintainable little SQL functions versus when I do
the same code as a big messy expression.  I got rid of STRICT, I've
tried STABLE and even IMMUTABLE and I can't seem to get the speed
difference to go away, so here are some questions:

(1) What are the current criteria for when an SQL function called
within another SQL function will be inlined?

(2) Is there some easy way to tell without massive logging whether
a particular function has been inlined?  I've tried doing various

EXPLAIN ... SELECT foo(...);

kinds of things where foo() calls bar() and I don't see that I can
tell anything about the inline status of either function.

Thanks,

_Greg

J. Greg Davidson

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

Предыдущее
От: Phoenix Kiula
Дата:
Сообщение: Re: URGENT: temporary table not recognized?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: When are SQL functions inlined & how can I tell?