Re: Improvement of var_eq_non_const()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Improvement of var_eq_non_const()
Дата
Msg-id 2781865.1740075685@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Improvement of var_eq_non_const()  (Teodor Sigaev <teodor@sigaev.ru>)
Ответы Re: Improvement of var_eq_non_const()
Список pgsql-hackers
Teodor Sigaev <teodor@sigaev.ru> writes:
> I'd like to suggest to improve var_eq_non_const() by using knowledge of MCV and
> estimate the selectivity as quadratic mean of non-null fraction divided by
> number of distinct values (as it was before) and set of MCV selectivities.

What's the statistical interpretation of this calculation (that is,
the average MCV selectivity)?  Maybe it's better, but without any
context it seems like a pretty random thing to do.  In particular,
it seems like this could give radically different answers depending
on how many MCVs we chose to store, and I'm not sure we could argue
that the result gets more accurate with more MCVs stored.

            regards, tom lane



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