Re: [HACKERS] Bad n_distinct estimation; hacks suggested?

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
Дата
Msg-id 426EB580.9040606@dunslane.net
обсуждение исходный текст
Ответ на Re: [HACKERS] Bad n_distinct estimation; hacks suggested?  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-performance

Simon Riggs wrote:

>The comment
>     * Every value in the sample appeared more than once.  Assume
>     * the column has just these values.
>doesn't seem to apply when using larger samples, as Josh is using.
>
>Looking at Josh's application it does seem likely that when taking a
>sample, all site visitors clicked more than once during their session,
>especially if they include home page, adverts, images etc for each page.
>
>Could it be that we have overlooked this simple explanation and that the
>Haas and Stokes equation is actually quite good, but just not being
>applied?
>
>
>
>

No, it is being aplied.  If every value in the sample appears more than
once, then f1 in the formula is 0, and the result is then just d, the
number of distinct values in the sample.

cheers

andrew

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

Предыдущее
От: "Dave Held"
Дата:
Сообщение: Re: [HACKERS] Bad n_distinct estimation; hacks suggested?
Следующее
От: Mike Rylander
Дата:
Сообщение: Re: Table Partitioning: Will it be supported in Future?