]> granicus.if.org Git - postgresql/commit
Collect and use multi-column dependency stats
authorSimon Riggs <simon@2ndQuadrant.com>
Wed, 5 Apr 2017 22:00:42 +0000 (18:00 -0400)
committerSimon Riggs <simon@2ndQuadrant.com>
Wed, 5 Apr 2017 22:00:42 +0000 (18:00 -0400)
commit2686ee1b7ccfb9214064d4d2a98ea77382880306
tree32095d935e240b93ed30b1e86c2efa161cffa4dd
parent00b6b6feb12cef53737287b67ecef6aff1f1d8ab
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
31 files changed:
contrib/file_fdw/file_fdw.c
contrib/postgres_fdw/postgres_fdw.c
doc/src/sgml/catalogs.sgml
doc/src/sgml/planstats.sgml
doc/src/sgml/ref/create_statistics.sgml
src/backend/catalog/system_views.sql
src/backend/commands/statscmds.c
src/backend/optimizer/path/clausesel.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/util/orclauses.c
src/backend/optimizer/util/plancat.c
src/backend/statistics/Makefile
src/backend/statistics/README
src/backend/statistics/README.dependencies [new file with mode: 0644]
src/backend/statistics/dependencies.c [new file with mode: 0644]
src/backend/statistics/extended_stats.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/selfuncs.c
src/bin/psql/describe.c
src/include/catalog/pg_cast.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_statistic_ext.h
src/include/catalog/pg_type.h
src/include/optimizer/cost.h
src/include/statistics/extended_stats_internal.h
src/include/statistics/statistics.h
src/test/regress/expected/opr_sanity.out
src/test/regress/expected/rules.out
src/test/regress/expected/stats_ext.out
src/test/regress/expected/type_sanity.out
src/test/regress/sql/stats_ext.sql