Re: Why is index disregarded when querying a timestamp?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why is index disregarded when querying a timestamp?
Дата
Msg-id 25048.1025710334@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Why is index disregarded when querying a timestamp?  ("Markus Wollny" <Markus.Wollny@computec.de>)
Список pgsql-general
"Markus Wollny" <Markus.Wollny@computec.de> writes:
> I would like to know why this query here doesn't use the index on
> ct_com_board_message....

>     from        CT_COM_BOARD_MESSAGE    MESSAGE
>     where        (0=0)
>     and (MESSAGE.CREATED >= CURRENT_TIMESTAMP-1)
>                 LIMIT 500

That's not considered an indexable WHERE clause in current releases
(7.3 will fix this).  See past discussions about how to hide the
current_timestamp call in a function marked "isCachable".

            regards, tom lane



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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Why is index disregarded when querying a timestamp?
Следующее
От: Robert Treat
Дата:
Сообщение: Re: README file for postgresql server upgrade