> On Aug 20, 2021, at 11:20 AM, Tomas Vondra <tomas.von...@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/important enough. 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. The patch 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
- Re: Use extended statistics to estimate (Var op Var) clauses Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var) clauses Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var) cla... Mark Dilger
- Re: Use extended statistics to estimate (Var op Var)... Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var)... Mark Dilger
- Re: Use extended statistics to estimate (Var op Var)... Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var)... Mark Dilger
- Re: Use extended statistics to estimate (Var op Var)... Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var)... Mark Dilger
- Re: Use extended statistics to estimate (Var op Var)... Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var)... Mark Dilger
- Re: Use extended statistics to estimate (Var op Var)... Robert Haas
- Re: Use extended statistics to estimate (Var op Var)... Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var)... Robert Haas
- Re: Use extended statistics to estimate (Var op Var)... Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var)... Zhihong Yu
- Re: Use extended statistics to estimate (Var op Var)... Mark Dilger
- Re: Use extended statistics to estimate (Var op Var)... Zhihong Yu
- Re: Use extended statistics to estimate (Var op Var)... Mark Dilger
- Re: Use extended statistics to estimate (Var op Var)... Tomas Vondra
- Re: Use extended statistics to estimate (Var op Var)... Zhihong Yu