Re: calculated expressions and index use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: calculated expressions and index use
Дата
Msg-id 20100.1043945485@sss.pgh.pa.us
обсуждение исходный текст
Ответ на calculated expressions and index use  (Pavel Hlavnicka <pavel@gingerall.cz>)
Ответы Re: calculated expressions and index use  (Pavel Hlavnicka <pavel@gingerall.cz>)
Список pgsql-sql
Pavel Hlavnicka <pavel@gingerall.cz> writes:
> select * from foo
> where created_at >= 'now'::timestamp - '1 hour'::interval;

> My table is indexed on created_at field. The query above doesn't use it, 

What's your PG version?  In 7.2 and later that expression will be folded
to a constant.
        regards, tom lane


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

Предыдущее
От: Arjen van der Meijden
Дата:
Сообщение: Re: calculated expressions and index use
Следующее
От: "Chad Thompson"
Дата:
Сообщение: Re: CSV import