Re: Performance of query (fwd)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Performance of query (fwd)
Дата
Msg-id 19959.1055350714@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Performance of query (fwd)  (Edmund Dengler <edmundd@eSentire.com>)
Ответы Re: Performance of query (fwd)  (Edmund Dengler <edmundd@eSentire.com>)
Список pgsql-general
Edmund Dengler <edmundd@eSentire.com> writes:
> Ok, tried it with a constant. No improvements. The estimator is still very
> high.

>   where timestamp > '2003-06-11 9:22 EDT'::timestamp

>                                                          ->  Index Scan using timestamp_idx on event
(cost=0.00..557630.23rows=237136 width=24) (actual time=0.22..16.58 rows=139 loops=1) 
>                                                                Index Cond: ("timestamp" > ('2003-06-11
09:22:00'::timestampwithout time zone)::timestamp with time zone) 

It would probably help if you cast the constant to the same datatype
as the column is (which is evidently timestamp with time zone).
Coercions between timestamp and timestamptz are not considered
constants, because they depend on SET TIMEZONE.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Performance of query (fwd)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Index not being used in MAX function (7.2.3)