Re: why doesn't an index help my simple query?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: why doesn't an index help my simple query?
Дата
Msg-id 17059.1054348153@sss.pgh.pa.us
обсуждение исходный текст
Ответ на why doesn't an index help my simple query?  (Peter Bierman <bierman@apple.com>)
Ответы Re: why doesn't an index help my simple query?  (Peter Bierman <bierman@apple.com>)
Список pgsql-novice
Peter Bierman <bierman@apple.com> writes:
> As you can see below, using an index doesn't seem to have any
> significant impact on the query speed. Why not?

>   Index Scan Backward using events_time_key on events
> (cost=0.00..4556.74 rows=71659 width=20) (actual time=0.84..16495.36
> rows=16 loops=1)
>     Filter: (("time")::timestamp with time zone > (now() - '00:02'::interval))

Hm, why is that shown as a "filter" and not an "index condition"?  And
why is there an explicit conversion to timestamp with time zone in
there?  Better tell us about the exact data types involved here ...

            regards, tom lane

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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: nOOB Question..
Следующее
От: Don Patou
Дата:
Сообщение: Re: using queries as default value?