Re: proposal : cross-column stats

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: proposal : cross-column stats
Дата
Msg-id C6F0DEEC-3CF2-4194-9582-304874760ABA@phlo.org
обсуждение исходный текст
Ответ на Re: proposal : cross-column stats  (Tomas Vondra <tv@fuzzy.cz>)
Ответы Re: proposal : cross-column stats  (tv@fuzzy.cz)
Список pgsql-hackers
On Dec17, 2010, at 23:12 , Tomas Vondra wrote:
> Well, not really - I haven't done any experiments with it. For two
> columns selectivity equation is
> 
>      (dist(A) * sel(A) + dist(B) * sel(B)) / (2 * dist(A,B))
> 
> where A and B are columns, dist(X) is number of distinct values in
> column X and sel(X) is selectivity of column X.

Huh? This is the selectivity estimate for "A = x AND B = y"? Surely,
if A and B are independent, the formula must reduce to sel(A) * sel(B),
and I cannot see how that'd work with the formula above.

best regards,
Florian Pflug



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

Предыдущее
От: David Christensen
Дата:
Сообщение: Re: plperlu problem with utf8
Следующее
От: Alex Hunsaker
Дата:
Сообщение: Re: plperlu problem with utf8