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 25228.988989496@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:
> True, using a different cust_num, it is possible there may be a couple of
> cust_num where that would be true.  The majority will not have even near
> that many. In this case there are only 13 matching records. Is VACUUMDB
> ANALYZE using the worst case (the cust_num with the greatest number of rows)
> senario for this?

Yes, because that's as far as the statistics go at the moment :-(.
The frequency of the most common value is basically all the info the
planner has about the data distribution, and so a highly skewed
distribution leads to bad plan choices.

I am presently working on better statistics ... to appear in 7.2 ...

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: VACUUM is hanging
Next
From: "Gordan Bobic"
Date:
Subject: Re: Re: Ideal hardware configuration for pgsql