Re: Forcing query to use an index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Forcing query to use an index
Дата
Msg-id 8864.1046817200@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Forcing query to use an index  (Greg Stark <gsstark@mit.edu>)
Список pgsql-sql
Greg Stark <gsstark@MIT.EDU> writes:
> I admit using 9999-01-01 as a date gives me the willies. But it does match
> with the way the field is used and it produces nice clean index range
> lookups.

If you're willing to switch to type 'timestamp' then you could use the
special value 'infinity' (or '-infinity' when you need it to sort before
instead of after normal times).

There was some talk awhile back of making type 'date' support infinity
as well.  This'd cost one day at each end of the allowable range, which
doesn't seem like a big loss.  But no one's done the legwork.
        regards, tom lane


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

Предыдущее
От: Tomasz Myrta
Дата:
Сообщение: Re: LIMIT and SUBQUERIES
Следующее
От: Christoph Haller
Дата:
Сообщение: Re: Insert multiple Rows