From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: 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:37:12 -0800 (PST)
Message-ID: <20031129093428.R75231@megazone.bigpanda.com> (raw)
In-Reply-To: <20031129164924.51035.qmail@web21401.mail.yahoo.com>
References: <20031129164924.51035.qmail@web21401.mail.yahoo.com>
On Sat, 29 Nov 2003, ow wrote:
> Am trying to find duplicate values in a large table (about 80M records).
> Somehow, none of the two (2) queries (see below) is using the index "I_bca"
> that, I believe, should've been used.
As a side note, to help determine if it should be used, you probably want
explain analyze not just explain. In general the index is only going to
help you if the sort is very expensive, not for the initial scan (where
the seq scan is generally faster).
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: sszabo@megazone.bigpanda.com, oneway_111@yahoo.com
Subject: Re: Seq Scans when index expected to be used
In-Reply-To: <20031129093428.R75231@megazone.bigpanda.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