Re: query with timestamp not using index

От: Tom Lane
Тема: Re: query with timestamp not using index
Дата: ,
Msg-id: 18427.1101931618@sss.pgh.pa.us
(см: обсуждение, исходный текст)
Ответ на: query with timestamp not using index  (Brian Hirt)
Список: pgsql-performance

Скрыть дерево обсуждения

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 по дате сообщения:

От: Josh Berkus
Дата:
Сообщение: Re: Recommended Specs
От: sarlav kumar
Дата:
Сообщение: pg replication tools?