How do I index to speed up OVERLAPS?

Поиск
Список
Период
Сортировка
От Matthew Wilson
Тема How do I index to speed up OVERLAPS?
Дата
Msg-id slrngj3cd4.b3g.matt@sprout.tplus1.com
обсуждение исходный текст
Ответы Re: How do I index to speed up OVERLAPS?  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
I have a table shift with a start_time column and a stop_time column and
I do a lot of queries like:

    select * from shift
    where (start_time, stop_time) overlaps ($A, $B);

$A and $B are user-submitted values.

Anyhow, how do I put indexes on my table to make these queries run
faster?

Also, is there a better data type to use for ranges of time?

TIA

Matt

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

Предыдущее
От: ries van Twisk
Дата:
Сообщение: Re: Install question on Mac Leopard Server 10.5
Следующее
От: ries van Twisk
Дата:
Сообщение: Re: Install question on Mac Leopard Server 10.5