Re: why doesn't an index help my simple query? - Mailing list pgsql-novice

From Tom Lane
Subject Re: why doesn't an index help my simple query?
Date
Msg-id 17059.1054348153@sss.pgh.pa.us
Whole thread Raw
In response to why doesn't an index help my simple query?  (Peter Bierman <bierman@apple.com>)
Responses Re: why doesn't an index help my simple query?
List 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 by date:

Previous
From: Josh Berkus
Date:
Subject: Re: nOOB Question..
Next
From: Don Patou
Date:
Subject: Re: using queries as default value?