Re: Seq Scans when index expected to be used

From: Joe Conway <mail(at)joeconway(dot)com>
To: jasiek <jasiek(at)klaster(dot)net>
Cc: ow <oneway_111(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Seq Scans when index expected to be used
Date: 2003-11-29 17:26:43
Message-ID: 3FC8D6D3.2030504@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

jasiek wrote:
> On Sat, 29 Nov 2003 08:49:24 -0800 (PST), ow 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.

Joe

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-11-29 17:37:12 Re: Seq Scans when index expected to be used
Previous Message Tom Lane 2003-11-29 17:24:10 Re: Seq Scans when index expected to be used