Re: Seq Scans when index expected to be used - Mailing list pgsql-sql

From ow
Subject Re: Seq Scans when index expected to be used
Date
Msg-id 20031129180159.91794.qmail@web21404.mail.yahoo.com
Whole thread Raw
In response to Re: Seq Scans when index expected to be used  (Joe Conway <mail@joeconway.com>)
Responses Re: Seq Scans when index expected to be used  (Joe Conway <mail@joeconway.com>)
List pgsql-sql
--- Joe Conway <mail@joeconway.com> wrote:
> > 
> >>explain select b, c, a
> >>from test
> >>group by b, c, a
> >>having count(*) > 1
> 
> Why would you expect this to use an index scan when it needs to read the 
> entire table? If you read the whole table (or even a significant 
> fraction of it), a seq scan is faster.

My impression was that the index "I_bca" covers the query, hence there should
not be a need to go to the table itself. Why would it?

P.S.
explain analyze vs explain. Normally, would've used "explain analyze" but in
this case it's taking way too long so I used "explain".

Thanks





__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/


pgsql-sql by date:

Previous
From: greg@turnstep.com
Date:
Subject: Re: Equivalent of Reverse() functions
Next
From: Andreas Heissenberger
Date:
Subject: