From: ow <oneway_111@yahoo.com>
To: Joe Conway <mail@joeconway.com>
To: jasiek <jasiek@klaster.net>
Cc: ow <oneway_111@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Seq Scans when index expected to be used
Date: Sat, 29 Nov 2003 10:01:59 -0800 (PST)
Message-ID: <20031129180159.91794.qmail@web21404.mail.yahoo.com> (raw)
In-Reply-To: <3FC8D6D3.2030504@joeconway.com>
--- 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/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: oneway_111@yahoo.com, mail@joeconway.com, jasiek@klaster.net
Subject: Re: Seq Scans when index expected to be used
In-Reply-To: <20031129180159.91794.qmail@web21404.mail.yahoo.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox