pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Simon Riggs <simon@2ndQuadrant.com>
To: pgsql-committers@postgresql.org
Subject: pgsql: Collect and use multi-column dependency stats
Date: Wed, 05 Apr 2017 22:06:02 +0000
Message-ID: <E1cvt3y-0008R4-5z@gemulon.postgresql.org> (raw )
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
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 7b504eb282ca2f5104b5c00b4f05a3ef6bb1385b 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
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/2686ee1b7ccfb9214064d4d2a98ea77382880306
Modified Files
--------------
contrib/file_fdw/file_fdw.c | 1 +
contrib/postgres_fdw/postgres_fdw.c | 5 +-
doc/src/sgml/catalogs.sgml | 9 +
doc/src/sgml/planstats.sgml | 154 +++
doc/src/sgml/ref/create_statistics.sgml | 42 +-
src/backend/catalog/system_views.sql | 3 +-
src/backend/commands/statscmds.c | 17 +-
src/backend/optimizer/path/clausesel.c | 113 ++-
src/backend/optimizer/path/costsize.c | 25 +-
src/backend/optimizer/util/orclauses.c | 4 +-
src/backend/optimizer/util/plancat.c | 12 +
src/backend/statistics/Makefile | 2 +-
src/backend/statistics/README | 68 +-
src/backend/statistics/README.dependencies | 119 +++
src/backend/statistics/dependencies.c | 1079 ++++++++++++++++++++++
src/backend/statistics/extended_stats.c | 105 ++-
src/backend/utils/adt/ruleutils.c | 54 +-
src/backend/utils/adt/selfuncs.c | 20 +-
src/bin/psql/describe.c | 12 +-
src/include/catalog/pg_cast.h | 4 +
src/include/catalog/pg_proc.h | 9 +
src/include/catalog/pg_statistic_ext.h | 7 +-
src/include/catalog/pg_type.h | 4 +
src/include/optimizer/cost.h | 6 +-
src/include/statistics/extended_stats_internal.h | 5 +
src/include/statistics/statistics.h | 44 +
src/test/regress/expected/opr_sanity.out | 3 +-
src/test/regress/expected/rules.out | 3 +-
src/test/regress/expected/stats_ext.out | 110 ++-
src/test/regress/expected/type_sanity.out | 7 +-
src/test/regress/sql/stats_ext.sql | 68 ++
31 files changed, 2035 insertions(+), 79 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
view thread (14+ messages) latest in thread
Message-ID: <E1cvt3y-0008R4-5z@gemulon.postgresql.org>
Permalink: ../E1cvt3y-0008R4-5z@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1cvt3y-0008R4-5z@gemulon.postgresql.org
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: simon@2ndQuadrant.com
Subject: Re: pgsql: Collect and use multi-column dependency stats
In-Reply-To: <E1cvt3y-0008R4-5z@gemulon.postgresql.org>
References: <E1cvt3y-0008R4-5z@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox