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

From Peter Geoghegan
Subject Re: ANALYZE sampling is too good
Date
Msg-id CAM3SWZRB8dH5RUzpi_fPD3yakFEivoHo1v69Yrv8yDoU+S7DxQ@mail.gmail.com
Whole thread Raw
In response to Re: ANALYZE sampling is too good  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: ANALYZE sampling is too good
Re: ANALYZE sampling is too good
List pgsql-hackers
On Tue, Dec 10, 2013 at 4:14 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> err, so what does stats target mean exactly in statistical theory?

Why would I even mention that to a statistician? We want guidance. But
yes, I bet I could give a statistician an explanation of statistics
target that they'd understand without too much trouble.

> Waiting for a statistician, and confirming his credentials before you
> believe him above others here, seems like wasted time.
>
> What your statistician will tell you is it that YMMV, depending on the data.

I'm reasonably confident that they'd give me more than that.

> So we'll still need a parameter to fine tune things when the default
> is off. We can argue about the default later, in various level of
> rigour.
>
> Block sampling, with parameter to specify sample size. +1

Again, it isn't as if the likely efficacy of *some* block sampling
approach is in question. I'm sure analyze.c is currently naive about
many things. Everyone knows that there are big gains to be had.
Balancing those gains against the possible downsides in terms of
impact on the quality of statistics generated is pretty nuanced. I do
know enough to know that a lot of thought goes into mitigating and/or
detecting the downsides of block-based sampling.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: ANALYZE sampling is too good
Next
From: Michael Paquier
Date:
Subject: Re: [COMMITTERS] pgsql: Add a new reloption, user_catalog_table.