Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane escribi�:
>> If you want ANALYZE to be cheap then you simply don't get to have a
>> trustworthy value of ndistinct.
> But then, maybe it's not all that critical that ANALYZE is cheap. For
> example, if we were to rework VACUUM ANALYZE so that on the same pass
> that VACUUM cleans each heap page, a callback is called on the page to
> grab the needed stats.
> Partial vacuum is a roadblock for this though :-(
Yeah --- now that partial vacuum is in, any argument that we can make
ANALYZE piggyback on VACUUM cheaply is dead anyway.
It would be interesting to consider "partial analyze" processing, but I
don't see how you would combine per-page partial results without a huge
increase in stats-related state data.
regards, tom lane