Re: "Bug" in statistics for v7.2? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: "Bug" in statistics for v7.2?
Date
Msg-id 14858.1013795139@sss.pgh.pa.us
Whole thread Raw
In response to Re: "Bug" in statistics for v7.2?  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
List pgsql-hackers
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> The pg_stats values are only, um, statistical.  If 99.9% of the table is
> the same value and the other four values appear only once or twice, it's
> certainly possible for ANALYZE's sample to include only the common value
> and miss the rare ones.  AFAIK that will not break anything; if you have
> an example where the planner seems to be fooled because of this, let's
> see it.

> Hmm ? How about select * from xxx where profiles_faith = 7
> would estimate all rows, no ? Instead of 2.

Not in 7.2 ... nor in previous versions AFAIR.

> That is why I think a bin for "very uncommon" values could also be 
> useful sometimes.

Perhaps you should experiment or read the code before opining...
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: Ready to branch 7.2/7.3 ?
Next
From: Peter Eisentraut
Date:
Subject: Re: Maintaining the list of release changes