Re: Incorrect expected rows by ANALYZE - Mailing list pgsql-hackers

From Kevin Brown
Subject Re: Incorrect expected rows by ANALYZE
Date
Msg-id 20030407200021.GT1833@filer
Whole thread Raw
In response to Re: Incorrect expected rows by ANALYZE  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: No merge sort?
Next
From: Greg Stark
Date:
Subject: Re: [INTERFACES] More protocol discussion: breaking down query processing