Re: 8.x index insert performance

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: 8.x index insert performance
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3417DD732@Herge.rcsinc.local
обсуждение исходный текст
Ответ на 8.x index insert performance  (Kelly Burkhart <kelly@tradebotsystems.com>)
Ответы Re: 8.x index insert performance  (Greg Stark <gsstark@mit.edu>)
Список pgsql-performance
> select * from sometable where somefield IS NULL won't work because IS
is
> not a nomally indexible operator.

Ah, I didn't know that.  So there is no real reason not to exclude null
values from all your indexes :).  Reading Tom's recent comments
everything is clear now.

Instead of using your two index approach I prefer to:
create function nullidx(anyelement) returns boolean as $$ select $1 is
null; $$ language
sql immutable;

create index on t(nullidx(f)); -- etc

Merlin

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 8.x index insert performance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: 8.x index insert performance