Re: query with timestamp not using index - Mailing list pgsql-performance

From Tom Lane
Subject Re: query with timestamp not using index
Date
Msg-id 18427.1101931618@sss.pgh.pa.us
Whole thread Raw
In response to query with timestamp not using index  (Brian Hirt <bhirt@mobygames.com>)
List pgsql-performance
Brian Hirt <bhirt@mobygames.com> writes:
> select count(*) from redir_log
> where redir_timestamp >= '10/14/2004'::timestamp without time zone at time zone 'GMT';

That seems like the hard way to express a timestamp constant.  Why not

select count(*) from redir_log
where redir_timestamp >= '10/14/2004 00:00 GMT';

(FWIW, though, the AT TIME ZONE construct *should* have been collapsed
to a constant; 8.0 fixes this.)

            regards, tom lane

pgsql-performance by date:

Previous
From: "Iain"
Date:
Subject: Re: Alternatives to Dell?
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Alternatives to Dell?