pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add support for multivariate MCV lists
Date: Wed, 27 Mar 2019 19:02:01 +0000
Message-ID: <E1h9DoH-0004Bn-4N@gemulon.postgresql.org> (raw )
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7300a699502fe5432b05fbc75baca534b080bebb
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 13 +-
doc/src/sgml/func.sgml | 82 ++
doc/src/sgml/perform.sgml | 66 +
doc/src/sgml/planstats.sgml | 116 +-
doc/src/sgml/ref/create_statistics.sgml | 35 +-
src/backend/commands/statscmds.c | 82 +-
src/backend/nodes/bitmapset.c | 44 +
src/backend/optimizer/path/clausesel.c | 109 +-
src/backend/optimizer/util/plancat.c | 12 +
src/backend/parser/parse_utilcmd.c | 2 +
src/backend/statistics/Makefile | 2 +-
src/backend/statistics/README | 4 +
src/backend/statistics/README.mcv | 100 ++
src/backend/statistics/dependencies.c | 100 +-
src/backend/statistics/extended_stats.c | 627 +++++++-
src/backend/statistics/mcv.c | 1695 ++++++++++++++++++++++
src/backend/utils/adt/ruleutils.c | 24 +-
src/bin/psql/describe.c | 9 +-
src/bin/psql/tab-complete.c | 2 +-
src/include/catalog/pg_cast.dat | 6 +
src/include/catalog/pg_proc.dat | 24 +
src/include/catalog/pg_statistic_ext.h | 2 +
src/include/catalog/pg_type.dat | 7 +
src/include/nodes/bitmapset.h | 1 +
src/include/optimizer/optimizer.h | 6 +
src/include/statistics/extended_stats_internal.h | 40 +
src/include/statistics/statistics.h | 40 +
src/test/regress/expected/create_table_like.out | 2 +-
src/test/regress/expected/opr_sanity.out | 3 +-
src/test/regress/expected/stats_ext.out | 287 +++-
src/test/regress/expected/type_sanity.out | 3 +-
src/test/regress/sql/stats_ext.sql | 186 +++
32 files changed, 3597 insertions(+), 134 deletions(-)
view thread (16+ messages) latest in thread
Message-ID: <E1h9DoH-0004Bn-4N@gemulon.postgresql.org>
Permalink: ../E1h9DoH-0004Bn-4N@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1h9DoH-0004Bn-4N@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: tomas.vondra@postgresql.org
Subject: Re: pgsql: Add support for multivariate MCV lists
In-Reply-To: <E1h9DoH-0004Bn-4N@gemulon.postgresql.org>
References: <E1h9DoH-0004Bn-4N@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