Re: Another "why am I not using the indicies?" - Mailing list pgsql-general

From Tom Lane
Subject Re: Another "why am I not using the indicies?"
Date
Msg-id 25029.988988079@sss.pgh.pa.us
Whole thread Raw
In response to Another "why am I not using the indicies?"  ("Clinton James" <cjames@callone.net>)
List pgsql-general
"Clinton James" <cjames@callone.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

pgsql-general by date:

Previous
From: Vivek Khera
Date:
Subject: Re: mysql to Pgsql
Next
From: Steve Wampler
Date:
Subject: Re: DB Getting Slower and Slower and Slower....