Tom Lane wrote:
> Kenji Sugita <sugita@srapc1327.sra.co.jp> writes:
> > Why do dead tuples cause incorrect expected rows by ANALYZE?
>
> Because it extrapolates the density of live rows in the whole table from
> their density in the first few pages.
Shouldn't it select random pages within the table for sampling? It
would be almost as fast and would probably yield much more reliable
statistics, because it would be much more likely to reflect
recently-made changes, particularly on tables that haven't been
VACUUMed recently..
--
Kevin Brown kevin@sysexperts.com