From: Tom Lane <tgl@sss.pgh.pa.us>
To: Anibal David Acosta <aa@devshock.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Do cast affects index usage?
Date: Fri, 12 Oct 2012 16:38:31 -0400
Message-ID: <21823.1350074311@sss.pgh.pa.us> (raw)
In-Reply-To: <004301cda8b4$fdc57bd0$f9507370$@devshock.com>
References: <004301cda8b4$fdc57bd0$f9507370$@devshock.com>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, aa@devshock.com
Subject: Re: Do cast affects index usage?
In-Reply-To: <21823.1350074311@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox