Do cast affects index usage?

From: "Anibal David Acosta" <aa(at)devshock(dot)com>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: Do cast affects index usage?
Date: 2012-10-12 20:05:52
Message-ID: 004301cda8b4$fdc57bd0$f9507370$@devshock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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?

Thanks

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2012-10-12 20:37:37 Re: Do cast affects index usage?
Previous Message Korisk 2012-10-12 14:37:48 Re: hash aggregation