Tom Lane wrote:
Maxim Boguk <mboguk@xxxxxxxxxxxxx> writes:[ ndistinct estimates way off ]Estimating the number of distinct values in a distribution with a long tail is just a really hard problem :-(
If I have a table where I know it has this property, is there any way I can tell autovacuum's ANALYZE to go ahead and scan the whole table? ISTM a vacuum_cost_delay throttled full table scan might be less harmful then a bad ndistinct guess.