Re: ANALYZE sampling is too good - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: ANALYZE sampling is too good
Date
Msg-id 52A78B79.6060904@agliodbs.com
Whole thread Raw
In response to ANALYZE sampling is too good  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On 12/10/2013 01:33 PM, Mark Kirkwood wrote:
> Yeah - and we seem to be back to Josh's point about needing 'some math'
> to cope with the rows within a block not being a purely random selection.

Well, sometimes they are effectively random.  But sometimes they are
not.  The Chaudri et al paper had a formula for estimating randomness
based on the grouping of rows in each block, assuming that the sampled
blocks were widely spaced (if they aren't there's not much you can do).This is where you get up to needing a 5% sample;
youneed to take
 
enough blocks that you're confident that the blocks you sampled are
representative of the population.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: pg_stat_statements fingerprinting logic and ArrayExpr
Next
From: Greg Stark
Date:
Subject: Re: ANALYZE sampling is too good