Re: Index on a range array

Поиск
Список
Период
Сортировка
От Daniel Cristian Cruz
Тема Re: Index on a range array
Дата
Msg-id CACffM9F3EuBiP=HqZ84F+4aVCjytf+5efnS1=ssOfxyCrahCTQ@mail.gmail.com
обсуждение исходный текст
Ответ на Index on a range array  (Daniel Cristian Cruz <danielcristian@gmail.com>)
Список pgsql-performance
I guess this is not a performance question... What kind of question would it be? Admin, General or SQL?


2013/8/13 Daniel Cristian Cruz <danielcristian@gmail.com>
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
クルズ クリスチアン ダニエル



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

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

Предыдущее
От: M Tarkeshwar Rao
Дата:
Сообщение: Need some basic information
Следующее
От: "Tomas Vondra"
Дата:
Сообщение: queries with DISTINCT / GROUP BY giving different plans