From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andrew Sullivan <ajs(at)crankycanuck(dot)ca> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: PostgreSQL ignores my indexes |
Date: | 2005-02-25 00:49:11 |
Message-ID: | 200502250049.j1P0nBK08307@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Andrew Sullivan wrote:
> This is probably better on -performance, and is certainly a FAQ.
> But. . .
>
> On Wed, Feb 23, 2005 at 03:01:52PM +0100, Thomas Braad Toft wrote:
> >
> > Table device contains 5285 rows, tmeevent contains 834912 rows.
> ^^^^ ^^^^^^
>
> > -> Seq Scan on tmeevent (cost=0.00..23606.12 rows=834912 width=138)
> > (actual time=0.04..2193.97 rows=834912 loops=1)
> ^^^^^^
>
> > -> Seq Scan on device (cost=0.00..564.85 rows=5285 width=29) (actual
> > time=0.04..25.07 rows=5285 loops=1)
> ^^^^
>
> > Why isn't the planner using my indexes? I tried making them as both rtree
>
> Because there's no advantage to using an index when you are fetching
> 100% of both tables. This is the most efficient plan. Of course,
> it's an open question whether you want to get 100% of both tables.
> But that's what you're doing, and using the index would be more
> expoensive than this.
Right. The FAQ addresses this issue.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | KÖPFERL Robert | 2005-02-25 08:33:32 | Re: Junk queries with variables? |
Previous Message | Joel Fradkin | 2005-02-24 22:34:08 | diference in dates in minutes |