Re: Function is called multiple times in subselect

Поиск
Список
Период
Сортировка
От Alex J. Avriette
Тема Re: Function is called multiple times in subselect
Дата
Msg-id 20040312201319.GY6396@posixnap.net
обсуждение исходный текст
Ответ на Re: Function is called multiple times in subselect  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On Fri, Mar 12, 2004 at 09:41:39AM -0500, Tom Lane wrote:

> > And if you are concerned about the query's cost vs its actual output
> > (you weren't clear in your original message), there is the 'iscachable'
> > pragma for functions.

> One of the reasons we renamed that pragma to "immutable" is that too
> many people were interpreting it as suggesting that Postgres would do
> some kind of caching of the function's results.  There is no such cache.

Well, I'm glad you told me that. However, I think that it could still be
useful. This allows indices to be built upon the results of functions. In
one case this proved to be tremendously fast compared to using lower(foo)
dynamically. lower(foo) will always return the same value, as would the
original poster's.

But I digress.

Alex

--
alex@posixnap.net
Alex J. Avriette, Unix Systems Gladiator
"Shut down some of the bullshit the government is spending money on and use it
to buy all the Microsoft stock. If we did that, we could ... just bronze Gates,
turn him into a statue, and stick him in front of the Commerce Department." - Scott McNealy

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Function is called multiple times in subselect
Следующее
От: Christopher Browne
Дата:
Сообщение: Re: buglet in 7.1.4