Use multi-variate MCV lists to estimate ScalarArrayOpExpr
authorTomas Vondra <tomas.vondra@postgresql.org>
Sat, 14 Mar 2020 13:56:37 +0000 (14:56 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Sat, 14 Mar 2020 15:13:00 +0000 (16:13 +0100)
commite83daa7e331e0718bb254ab685f2ed95df423554
tree277ffc346c2d8c579ccfc1867192f031bbc816df
parent8f321bd16cdb11307f17007eb3c55b65d7d323ef
Use multi-variate MCV lists to estimate ScalarArrayOpExpr

Commit 8f321bd16c added support for estimating ScalarArrayOpExpr clauses
(IN/ANY) clauses using functional dependencies. There's no good reason
not to support estimation of these clauses using multi-variate MCV lists
too, so this commits implements that. That makes the behavior consistent
and MCV lists can estimate all variants (ANY/ALL, inequalities, ...).

Author: Tomas Vondra
Review: Dean Rasheed
Discussion: https://www.postgresql.org/message-id/flat/13902317.Eha0YfKkKy%40pierred-pdoc
src/backend/statistics/extended_stats.c
src/backend/statistics/mcv.c
src/include/statistics/extended_stats_internal.h
src/test/regress/expected/stats_ext.out
src/test/regress/sql/stats_ext.sql