Re: Is there a point to having both a normal gist index and an exclude index?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is there a point to having both a normal gist index and an exclude index?
Дата
Msg-id 17326.1491365131@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is there a point to having both a normal gist index and an excludeindex?  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
Bruno Wolff III <bruno@wolff.to> writes:
> ... I create both a normal gist index and an exclude index using the
> following:
> CREATE INDEX contains ON iplocation USING gist (network inet_ops);
> ALTER TABLE iplocation
>   ADD CONSTRAINT overlap EXCLUDE USING gist (network inet_ops WITH &&);

> But I am wondering if it is useful to have the normal gist index for
> finding netblocks containing a specific IP address, as it seems like the
> exclude index should be usable for that as well.

No, that manually-created index is completely redundant with the
constraint index.

            regards, tom lane


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

Предыдущее
От: lin
Дата:
Сообщение: AEXPR_OR, AEXPR_AND is not in postgres 9.6, how can I rewrite whereit used in 9.3 ?
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: AEXPR_OR, AEXPR_AND is not in postgres 9.6, how can Irewrite where it used in 9.3 ?