Re: Speeding up index scans by truncating timestamp?

Поиск
Список
Период
Сортировка
От Vick Khera
Тема Re: Speeding up index scans by truncating timestamp?
Дата
Msg-id AANLkTimyPEqpzZxiyAAkxvFRTwDQcAW=QM4m4yJD9WXk@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Speeding up index scans by truncating timestamp?  (Derrick Rice <derrick.rice@gmail.com>)
Ответы Re: Speeding up index scans by truncating timestamp?  (Derrick Rice <derrick.rice@gmail.com>)
Re: Speeding up index scans by truncating timestamp?  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
Список pgsql-general
On Tue, Feb 15, 2011 at 10:00 AM, Derrick Rice <derrick.rice@gmail.com> wrote:
> Is the query optimizer capable of using the relationship between an index on
> date_trunc(foo) and a query with "where foo < bar and foo > baz" ?  At this
> point the question is to satisfy my own curiosity.

No. The query has to use the same function as the index does.

I also don't think that the storage space will be any less.  A
timestamp is always stored in the same amount of space. All you're
doing is zeroing out the higher resolution bits of time.

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

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Re: Speeding up index scans by truncating timestamp?
Следующее
От: Geoffrey Myers
Дата:
Сообщение: Re: finding bogus UTF-8