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

From Claudio Freire
Subject Re: ANALYZE sampling is too good
Date
Msg-id CAGTBQpbnhsc7h4fCHBG63kSYt3-DmyeTZ-QjGf30dN-xacrK4Q@mail.gmail.com
Whole thread Raw
In response to Re: ANALYZE sampling is too good  (Greg Stark <stark@mit.edu>)
Responses Re: ANALYZE sampling is too good
Re: ANALYZE sampling is too good
List pgsql-hackers
On Tue, Dec 10, 2013 at 11:02 AM, Greg Stark <stark@mit.edu> wrote:
>
> On 10 Dec 2013 08:28, "Albe Laurenz" <laurenz.albe@wien.gv.at> wrote:
>>
>>
>> Doesn't all that assume a normally distributed random variable?
>
> I don't think so because of the law of large numbers. If you have a large
> population and sample it the sample behaves like a normal distribution when
> if the distribution of the population isn't.


No, the large population says that if you have an AVERAGE of many
samples of a random variable, the random variable that is the AVERAGE
behaves like a normal.

The variable itself doesn't.

And for n_distinct, you need to know the variable itself.



pgsql-hackers by date:

Previous
From: Albe Laurenz
Date:
Subject: Re: ANALYZE sampling is too good
Next
From: Claudio Freire
Date:
Subject: Re: ANALYZE sampling is too good