Re: calculated expressions and index use

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: calculated expressions and index use
Дата
Msg-id 8577.1044024965@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: calculated expressions and index use  (Pavel Hlavnicka <pavel@gingerall.cz>)
Список pgsql-sql
Pavel Hlavnicka <pavel@gingerall.cz> writes:
> I use 7.2.1. :(

7.2 certainly will fold "'now'::timestamp - '1 hour'::interval" to a
timestamp constant.  This could be a datatype compatibility issue
(is created_at the same type?  in particular, with/without time zone?)
or it could be a selectivity issue --- ie, the planner might think the
condition covers too much of the table to make the index useful.

It would be useful to look at the results of EXPLAIN ANALYZE for this
query, with and without ENABLE_SEQSCAN turned off.
        regards, tom lane


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

Предыдущее
От: Pavel Hlavnicka
Дата:
Сообщение: Re: calculated expressions and index use
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: Postgres MD5 Function