Re: GiST, Not Using Index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: GiST, Not Using Index
Дата
Msg-id 29842.1046385523@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: GiST, Not Using Index  (Itai Zukerman <zukerman@math-hat.com>)
Список pgsql-sql
Itai Zukerman <zukerman@math-hat.com> writes:
>> Never leave out the "unimportant" stuff --- that's usually where you
>> went wrong ;-)

> OK, I've attached below the SQL I use to generate stuff and an
> interactive session with the "explain" etc.

Ah.  Your problem is you need to mark sig_in() as IMMUTABLE, or at least
STABLE, for an expression involving sig_in() to be considered safe to
index.  If it's in C, more than likely it'd best be marked STRICT too
(else you'd better have explicit NULL checks in the function code).

Don't forget to look at your other custom functions too, to see if
they're correctly marked.
        regards, tom lane


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

Предыдущее
От: Itai Zukerman
Дата:
Сообщение: Re: GiST, Not Using Index
Следующее
От: Denis Zaitsev
Дата:
Сообщение: Are scalar type's in/out functions implicitly STRICT?