postgresql/src/backend/utils
Tom Lane 0e5e167aae Collect and use element-frequency statistics for arrays.
This patch improves selectivity estimation for the array <@, &&, and @>
(containment and overlaps) operators.  It enables collection of statistics
about individual array element values by ANALYZE, and introduces
operator-specific estimators that use these stats.  In addition,
ScalarArrayOpExpr constructs of the forms "const = ANY/ALL (array_column)"
and "const <> ANY/ALL (array_column)" are estimated by treating them as
variants of the containment operators.

Since we still collect scalar-style stats about the array values as a
whole, the pg_stats view is expanded to show both these stats and the
array-style stats in separate columns.  This creates an incompatible change
in how stats for tsvector columns are displayed in pg_stats: the stats
about lexemes are now displayed in the array-related columns instead of the
original scalar-related columns.

There are a few loose ends here, notably that it'd be nice to be able to
suppress either the scalar-style stats or the array-element stats for
columns for which they're not useful.  But the patch is in good enough
shape to commit for wider testing.

Alexander Korotkov, reviewed by Noah Misch and Nathan Boley
2012-03-03 20:20:57 -05:00
..
adt Collect and use element-frequency statistics for arrays. 2012-03-03 20:20:57 -05:00
cache Allow LEAKPROOF functions for better performance of security views. 2012-02-13 22:21:14 -05:00
error Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
fmgr Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
hash Move CRC tables to libpgport, and provide them in a separate include file. 2012-02-28 19:53:39 -05:00
init Make superuser imply replication privilege. The idea of a privilege that 2012-01-14 18:22:16 +02:00
mb Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
misc Add const qualifiers where they are accidentally cast away 2012-02-28 12:42:08 +02:00
mmgr Run a portal's cleanup hook immediately when pushing it to FAILED state. 2012-02-15 16:19:01 -05:00
resowner Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
sort Fix VPATH builds, broken by my recent commit to speed up tuplesorting. 2012-02-15 15:53:53 -05:00
time Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
.gitignore Avoid maintaining three separate copies of the error codes list. 2011-02-03 22:32:49 -05:00
errcodes.txt Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Gen_dummy_probes.sed Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Gen_fmgrtab.pl Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
generate-errcodes.pl Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
Makefile Make handling of errcodes.h more consistent with other generated headers. 2011-02-04 09:29:10 -05:00
probes.d Make group commit more effective. 2012-01-30 16:53:48 +02:00