Re: Estimating number of distinct values.

2018-10-24 Thread Jeff Janes
On Wed, Oct 24, 2018 at 10:07 AM Konstantin Knizhnik < k.knizh...@postgrespro.ru> wrote: > > Real number of distinct value for this dataset is about 10 millions. For > some reasons, sampling using random blocks and Vitter algorithm produces > worser results than just examining first 3 rows of

Re: Estimating number of distinct values.

2018-10-24 Thread Tom Lane
Konstantin Knizhnik writes: > I will be pleased if somebody (first of all Robert) can comment me > "strange" results of distinct values estimation. Estimating the number of distinct values from a small sample is a hard problem; every algorithm is going to blow it in some cases. > In my case the

Estimating number of distinct values.

2018-10-24 Thread Konstantin Knizhnik
Hello hackers, I will be pleased if somebody (first of all Robert) can comment me "strange" results of distinct values estimation. There is the following code in analyze.c:        /*--              * Estimate the number of distinct values using the estimator              * propos