pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: 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 09:26:43 -0800
Message-ID: <3FC8D6D3.2030504@joeconway.com> (raw)
In-Reply-To: <20031129170913.M37199@klaster.net>
References: <20031129164924.51035.qmail@web21401.mail.yahoo.com>
	<20031129170913.M37199@klaster.net>

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






view thread (7+ messages)  latest in thread

Message-ID: <3FC8D6D3.2030504@joeconway.com>
Permalink:  ../3FC8D6D3.2030504@joeconway.com/
Also on:    postgresql.org/message-id/3FC8D6D3.2030504@joeconway.com

 · 

reply

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: mail@joeconway.com, jasiek@klaster.net, oneway_111@yahoo.com
  Subject: Re: Seq Scans when index expected to be used
  In-Reply-To: <3FC8D6D3.2030504@joeconway.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