Re: multivariate statistics / patch v6
Tomas Vondra <tomas.vondra@2ndquadrant.com>
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Jeff Janes <jeff.janes@gmail.com>, Stephen Frost <sfrost@snowman.net>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2015-05-06T20:03:50Z
Lists: pgsql-hackers
Attachments
- 0001-shared-infrastructure-and-functional-dependencies.patch (text/x-patch)
- 0002-clause-reduction-using-functional-dependencies.patch (text/x-patch) patch 0002
- 0003-multivariate-MCV-lists.patch (text/x-patch) patch 0003
- 0004-multivariate-histograms.patch (text/x-patch) patch 0004
- 0005-multi-statistics-estimation.patch (text/x-patch) patch 0005
- 0006-teach-expression-walker-about-RestrictInfo-because-o.patch (text/x-patch) patch 0006
Attached is v6 of the multivariate stats, with a number of improvements:
1) fix of the contrib compile-time errors (reported by Jeff)
2) fix of pg_proc issues (reported by Jeff)
3) rebase to current master
4) fix a bunch of issues in the previous patches, due to referencing
some parts too early (e.g. histograms in the first patch, etc.)
5) remove the explicit DELETEs from pg_mv_statistic (in the regression
tests), this is now handled automatically by DROP TABLE etc.
6) number of performance optimizations in selectivity estimations:
(a) minimize calls to get_oprrest, significantly reducing
syscache calls
(b) significant reduction of palloc overhead in deserialization of
MCV lists and histograms
(c) use more compact serialized representation of MCV lists and
histograms, often removing ~50% of the size
(d) use histograms with limited deserialization, which also allows
caching function calls
(e) modified histogram bucket partitioning, resulting in more even
bucket distribution (i.e. producing buckets with more equal
density and about equal size of each dimension)
7) add functions for listing MCV list items and histogram buckets:
- pg_mv_mcvlist_items(oid)
- pg_mv_histogram_buckets(oid, type)
This is quite useful when analyzing the MCV lists / histograms.
8) improved support for OR clauses
9) allow calling pull_varnos() on expression trees containing
RestrictInfo nodes (not sure if this is the right fix, it's being
discussed in another thread)
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Collect and use multi-column dependency stats
- 2686ee1b7ccf 10.0 landed
-
Implement SortSupport for macaddr data type
- f90d23d0c518 10.0 cited
-
Implement multivariate n-distinct coefficients
- 7b504eb282ca 10.0 landed
-
Generate fmgr prototypes automatically
- 352a24a1f9d6 10.0 cited