Re: Do cast affects index usage?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Anibal David Acosta" <aa(at)devshock(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Do cast affects index usage?
Date: 2012-10-13 01:34:08
Message-ID: 27829.1350092048@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Anibal David Acosta" <aa(at)devshock(dot)com> writes:
> Because I need to get all rows where datetime is greater than (for example)
> '2012-10-10 00:00:00' but ignoring timezone, so basically I need to truncate
> timezone
> This can be done by converting to timestamp without timezone.

[ shrug... ] It can also be done without that. Whatever your cutoff
time is can be expressed as a timestamp *with* tz.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Stefan Keller 2012-10-14 00:43:23 Index over all partitions (aka global index)?
Previous Message Tom Lane 2012-10-13 01:31:54 Re: problems with large objects dump