Use multi-variate MCV lists to estimate ScalarArrayOpExpr
Tomas Vondra <tomas.vondra@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/statistics/extended_stats.c | modified | +61 −5 |
| src/backend/statistics/mcv.c | modified | +109 −2 |
| src/include/statistics/extended_stats_internal.h | modified | +2 −2 |
| src/test/regress/expected/stats_ext.out | modified | +60 −0 |
| src/test/regress/sql/stats_ext.sql | modified | +20 −0 |
Discussion
- PATCH: add support for IN and @> in functional-dependency statistics use 24 messages · 2020-02-01 → 2020-07-01