Re: PATCH: adaptive ndistinct estimator v4

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: PATCH: adaptive ndistinct estimator v4
Дата
Msg-id CAMkU=1ySyCY1=8ZEeaEEPWD-9wn7ccXbQ6o=UJHU=3ZqA3-kxw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PATCH: adaptive ndistinct estimator v4  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Ответы Re: PATCH: adaptive ndistinct estimator v4  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-hackers
On Tue, Mar 31, 2015 at 12:02 PM, Tomas Vondra <tomas.vondra@2ndquadrant.com> wrote:
Hi all,

attached is v4 of the patch implementing adaptive ndistinct estimator.

Hi Tomas,

I have a case here where the adaptive algorithm underestimates ndistinct by a factor of 7 while the default estimator is pretty close.

5MB file:


# create table foo2 (x text);
# \copy foo2 from program 'bzcat ~/temp/foo1.txt.bz2'
# analyze verbose foo2;
INFO:  analyzing "public.foo2"
INFO:  "foo2": scanned 6021 of 6021 pages, containing 1113772 live rows and 0 dead rows; 30000 rows in sample, 1113772 estimated total rows
WARNING: ndistinct estimate current=998951.78 adaptive=135819.00

Cheers,

Jeff

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: initdb -S and tablespaces
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: FPW compression leaks information