Re: Incorrect expected rows by ANALYZE

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Incorrect expected rows by ANALYZE
Date: 2003-04-07 20:00:22
Message-ID: 20030407200021.GT1833@filer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Kenji Sugita <sugita(at)srapc1327(dot)sra(dot)co(dot)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(at)sysexperts(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2003-04-07 20:08:04 Re: [INTERFACES] More protocol discussion: breaking down query processing
Previous Message Dann Corbit 2003-04-07 19:58:27 Re: No merge sort?