Re: Use extended statistics to estimate (Var op Var) clauses

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема Re: Use extended statistics to estimate (Var op Var) clauses
Дата
Msg-id 635C993A-265E-4A1B-BACA-A90CDBA8440C@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Use extended statistics to estimate (Var op Var) clauses  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers

> On Aug 20, 2021, at 11:20 AM, Tomas Vondra <tomas.vondra@enterprisedb.com> wrote:
>
> I think we can either reject the patch, which would mean we don't consider (Var op Var) clauses to be
common/importantenough. Or we need to improve the existing selectivity functions (even those without extended
statistics)to handle those clauses in a smarter way. Otherwise there'd be strange/surprising inconsistencies. 

For datatypes with very few distinct values (bool, some enums, etc.) keeping an mcv list of (a,b) pairs seems helpful.
Thepatch may be worth keeping for such cases.  In other cases, I don't much see the point. 

It seems that sampling the fraction of rows where (A op B) is true for any given op would be more helpful.

—
Mark Dilger
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company






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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Use extended statistics to estimate (Var op Var) clauses
Следующее
От: Robert Haas
Дата:
Сообщение: Re: archive status ".ready" files may be created too early