Re: [GENERAL] Function index qeustion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [GENERAL] Function index qeustion
Дата
Msg-id 9914.1059176513@sss.pgh.pa.us
обсуждение исходный текст
Список pgsql-sql
Jonathan Bartlett <johnnyb@eskimo.com> writes:
> 1) If you have an index on a cacheable function, does PostgreSQL use the
> index instead of calculating the results?

Not in general --- only for an indexscan lookup.

> 2) How does PostgreSQL know when to recompute the function?

Never.  That's what the iscachable flag means: you are promising that
the function's output for given input never changes.  If you aren't
prepared to make that promise, you cannot index the function.

            regards, tom lane

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

Предыдущее
От: Jamie Lawrence
Дата:
Сообщение: Re: Odd problems with create rule
Следующее
От: Denis Zaitsev
Дата:
Сообщение: Very strange 'now' behaviour in nested triggers.