Peter Bierman <bierman(at)apple(dot)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