Re: query with timestamp not using index

From: Tom Lane
Subject: Re: query with timestamp not using index
Date: ,
Msg-id: 18427.1101931618@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: query with timestamp not using index  (Brian Hirt)
List: pgsql-performance

Tree view

query with timestamp not using index  (Brian Hirt, )
 Re: query with timestamp not using index  (Richard Huxton, )
 Re: query with timestamp not using index  (Brian Hirt, )
  Re: query with timestamp not using index  (Tom Lane, )
 Re: query with timestamp not using index  (Tom Lane, )

Brian Hirt <> 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:

From: Josh Berkus
Date:
Subject: Re: Recommended Specs
From: sarlav kumar
Date:
Subject: pg replication tools?