Re: Do cast affects index usage?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Do cast affects index usage?
Дата
Msg-id 21823.1350074311@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Do cast affects index usage?  ("Anibal David Acosta" <aa@devshock.com>)
Ответы Re: Do cast affects index usage?  ("Anibal David Acosta" <aa@devshock.com>)
Список pgsql-performance
"Anibal David Acosta" <aa@devshock.com> writes:
> I have a table with a column of type timestamp with time zone, this column
> has an index

> If I do a select like this
> select * from mytable where cast(my_date as timestamp without time zone) >
> '2012-10-12 20:00:00'
> this query will use the index over the my_date column?

No.  The cast seems rather pointless though ...

            regards, tom lane


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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Do cast affects index usage?
Следующее
От: Tomas Vondra
Дата:
Сообщение: Re: hash aggregation