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

From Greg Stark
Subject Re: ANALYZE sampling is too good
Date
Msg-id CAM-w4HPufZ6qa9TzJYK4pvKv2oBFWjYtyGp_Z7oZUR5zMs7W6g@mail.gmail.com
Whole thread Raw
In response to Re: ANALYZE sampling is too good  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Wed, Dec 11, 2013 at 12:08 PM, Greg Stark <stark@mit.edu> wrote:
> The only thing I can think
> of is maybe the most common elements are being selected preferentially
> from the early part of the sample which is removing a substantial part
> of the lower end of the range. But even removing 100 from the
> beginning shouldn't be enough to push the median above 550.

Just to follow up here. I think what's going is that not only are the
most_common_vals being preferentially taken from the beginning of the
sample but also their frequency is being massively overestimated. All
values have a frequency of about .001 but the head of the MCV has a
frequency as high as .10 in some of my tests.



-- 
greg



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: ANALYZE sampling is too good
Next
From: Robert Haas
Date:
Subject: Re: [PATCH] Add transforms feature