Re: Another "why am I not using the indicies?"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Clinton James" <cjames(at)callone(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Another "why am I not using the indicies?"
Date: 2001-05-04 14:54:39
Message-ID: 25029.988988079@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Clinton James" <cjames(at)callone(dot)net> writes:
> # explain select * from ld where cust_num = '10102899';
> NOTICE: QUERY PLAN:

> Seq Scan on ld (cost=0.00..20810.83 rows=8989 width=128)

The reason it's not using an indexscan is that it thinks it's going to
find 8989 matches (and if that were true, a seqscan probably *is* the
right plan). You must have some extremely-often-repeated entries in
that column; what are they, and can you get rid of them?

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gordan Bobic 2001-05-04 15:04:56 Re: Re: Ideal hardware configuration for pgsql
Previous Message Steve Wampler 2001-05-04 14:51:26 Re: DB Getting Slower and Slower and Slower....