btree gist indices, null and open-ended tsranges

Поиск
Список
Период
Сортировка
От Chris Withers
Тема btree gist indices, null and open-ended tsranges
Дата
Msg-id 18847817-c439-aacb-cb97-549eef1d1377@simplistix.co.uk
обсуждение исходный текст
Ответы Re: btree gist indices, null and open-ended tsranges
Список pgsql-general
Hi All,

Working with the exclude constraint example from
https://www.postgresql.org/docs/current/static/rangetypes.html:

CREATE EXTENSION btree_gist;
CREATE TABLE room_reservation (
     room text,
     during tsrange,
     EXCLUDE USING GIST (room WITH =, during WITH &&)
);

So, first observation: if I make room nullable, the exclude constraint
does not apply for rows that have a room of null. I guess that's to be
expected, right?

Next question: if lots of rows have open-ended periods
(eg: [, 2010-01-01 15:00) or [2010-01-01 14:00,)), how does that affect
the performance of the btree gist index backing the exclude constraint?

cheers,

Chris


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

Предыдущее
От: Juliano
Дата:
Сообщение: Overwrite pg_catalog?
Следующее
От: Francisco Olarte
Дата:
Сообщение: Re: Overwrite pg_catalog?