Re: ANALYZE sampling is too good

From: Greg Stark <stark(at)mit(dot)edu>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Peter Geoghegan <pg(at)heroku(dot)com>, Jim Nasby <jim(at)nasby(dot)net>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ANALYZE sampling is too good
Date: 2013-12-11 12:23:26
Message-ID: CAM-w4HPufZ6qa9TzJYK4pvKv2oBFWjYtyGp_Z7oZUR5zMs7W6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 11, 2013 at 12:08 PM, Greg Stark <stark(at)mit(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-12-11 12:40:35 Re: [PATCH] Add transforms feature
Previous Message Greg Stark 2013-12-11 12:08:21 Re: ANALYZE sampling is too good