Timestamp indexes (why ">" or "between" does not use index?)

Поиск
Список
Период
Сортировка
От Phoenix Kiula
Тема Timestamp indexes (why ">" or "between" does not use index?)
Дата
Msg-id e373d31e0802160642k5e90a5cfmb696dd59f5cfbeb4@mail.gmail.com
обсуждение исходный текст
Ответы Re: Timestamp indexes (why ">" or "between" does not use index?)
Re: Timestamp indexes (why ">" or "between" does not use index?)
Список pgsql-general
I have a table with an index on a field called "modify_date".

This works well if I have SQL which ends in

    WHERE modify_date = '2008-01-01'

But if I try this condition:

    WHERE modify_date = '2008-01-01'

THis index is not used. The EXPLAIN tells me it needs to do a seq
scan. Why is this? How can I make a date/time field index which uses
both equality criteria and the greater than/lesser than/between
criteria?

Thanks.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Metadata/ODBC query
Следующее
От: Michael Glaesemann
Дата:
Сообщение: Re: Strict-typing benefits/costs