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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Bierman <bierman(at)apple(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: why doesn't an index help my simple query?
Date: 2003-05-31 02:29:13
Message-ID: 17059.1054348153@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Don Patou 2003-05-31 02:49:18 Re: using queries as default value?
Previous Message Josh Berkus 2003-05-31 01:00:36 Re: nOOB Question..