Index on a range array

Поиск
Список
Период
Сортировка
От Daniel Cristian Cruz
Тема Index on a range array
Дата
Msg-id CACffM9HGyvh0OqwS7KbMLJ+zZ3t_gOmZTB-C2WpLdWu45JZwQg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Index on a range array  (Daniel Cristian Cruz <danielcristian@gmail.com>)
Re: Index on a range array  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-performance
Hello,

I'm trying to simplify a schema, where I had many ranges floating around. My idea is to put them all in an array field and query like this:

SELECT
 event.*
FROM event
JOIN participant_details
 USING (participant_id)
WHERE
 tsrange(event.start, event.end) && ANY (participant_details.periods);

periods is tsrange[].

I've tryed and it worked, but without indexes. I've tried something, but didn't found anything... Does someone know how to index this kind of field (tsrange[])?

From the docs I learn that there is some GIST magic, but I would need to code in C. Is that true?

Regards,
--
Daniel Cristian Cruz
クルズ クリスチアン ダニエル

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Function execute slow down in 9.2
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: subselect requires offset 0 for good performance.