On 11 December 2013 00:44, Greg Stark <st...@mit.edu> wrote: > On Wed, Dec 11, 2013 at 12:40 AM, Simon Riggs <si...@2ndquadrant.com> wrote: >> When we select a block we should read all rows on that block, to help >> identify the extent of clustering within the data. > > So how do you interpret the results of the sample read that way that > doesn't introduce bias?
Yes, it is not a perfect statistical sample. All sampling is subject to an error that is data dependent. I'm happy that we have an option to select this/or not and a default that maintains current behaviour, since otherwise we might expect some plan instability. I would like to be able to * allow ANALYZE to run faster in some cases * increase/decrease sample size when it matters * have the default sample size vary according to the size of the table, i.e. a proportional sample -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers