From 7300a699502fe5432b05fbc75baca534b080bebb Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date: Wed, 27 Mar 2019 18:32:18 +0100 Subject: Add support for multivariate MCV lists Introduce a third extended statistic type, supported by the CREATE STATISTICS command - MCV lists, a generalization of the statistic already built and used for individual columns. Compared to the already supported types (n-distinct coefficients and functional dependencies), MCV lists are more complex, include column values and allow estimation of much wider range of common clauses (equality and inequality conditions, IS NULL, IS NOT NULL etc.). Similarly to the other types, a new pseudo-type (pg_mcv_list) is used. Author: Tomas Vondra Reviewed-by: Dean Rasheed, David Rowley, Mark Dilger, Alvaro Herrera Discussion: https://postgr.es/m/dfdac334-9cf2-2597-fb27-f0fb3753f435@2ndquadrant.com --- src/include/optimizer/optimizer.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/include/optimizer/optimizer.h') diff --git a/src/include/optimizer/optimizer.h b/src/include/optimizer/optimizer.h index ffd812a4ed8..6086821f201 100644 --- a/src/include/optimizer/optimizer.h +++ b/src/include/optimizer/optimizer.h @@ -58,6 +58,12 @@ extern Selectivity clause_selectivity(PlannerInfo *root, int varRelid, JoinType jointype, SpecialJoinInfo *sjinfo); +extern Selectivity clauselist_selectivity_simple(PlannerInfo *root, + List *clauses, + int varRelid, + JoinType jointype, + SpecialJoinInfo *sjinfo, + Bitmapset *estimatedclauses); extern Selectivity clauselist_selectivity(PlannerInfo *root, List *clauses, int varRelid, -- cgit v1.2.3