mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
Collect and use multi-column dependency stats
Follow on patch in the multi-variate statistics patch series.
CREATE STATISTICS s1 WITH (dependencies) ON (a, b) FROM t;
ANALYZE;
will collect dependency stats on (a, b) and then use the measured
dependency in subsequent query planning.
Commit 7b504eb282 added
CREATE STATISTICS with n-distinct coefficients. These are now
specified using the mutually exclusive option WITH (ndistinct).
Author: Tomas Vondra, David Rowley
Reviewed-by: Kyotaro HORIGUCHI, Álvaro Herrera, Dean Rasheed, Robert Haas
and many other comments and contributions
Discussion: https://postgr.es/m/56f40b20-c464-fad2-ff39-06b668fac47c@2ndquadrant.com
This commit is contained in:
@@ -52,6 +52,11 @@ extern MVNDistinct *statext_ndistinct_build(double totalrows,
|
||||
extern bytea *statext_ndistinct_serialize(MVNDistinct *ndistinct);
|
||||
extern MVNDistinct *statext_ndistinct_deserialize(bytea *data);
|
||||
|
||||
extern MVDependencies *statext_dependencies_build(int numrows, HeapTuple *rows,
|
||||
Bitmapset *attrs, VacAttrStats **stats);
|
||||
extern bytea *statext_dependencies_serialize(MVDependencies *dependencies);
|
||||
extern MVDependencies *statext_dependencies_deserialize(bytea *data);
|
||||
|
||||
extern MultiSortSupport multi_sort_init(int ndims);
|
||||
extern void multi_sort_add_dimension(MultiSortSupport mss, int sortdim,
|
||||
Oid oper);
|
||||
|
||||
Reference in New Issue
Block a user