postgresql/src/test/regress
Tom Lane a4523c5aa5 Improve planning of btree index scans using ScalarArrayOpExpr quals.
Since we taught btree to handle ScalarArrayOpExpr quals natively (commit
9e8da0f757), the planner has always included
ScalarArrayOpExpr quals in index conditions if possible.  However, if the
qual is for a non-first index column, this could result in an inferior plan
because we can no longer take advantage of index ordering (cf. commit
807a40c551).  It can be better to omit the
ScalarArrayOpExpr qual from the index condition and let it be done as a
filter, so that the output doesn't need to get sorted.  Indeed, this is
true for the query introduced as a test case by the latter commit.

To fix, restructure get_index_paths and build_index_paths so that we
consider paths both with and without ScalarArrayOpExpr quals in non-first
index columns.  Redesign the API of build_index_paths so that it reports
what it found, saving useless second or third calls.

Report and patch by Andrew Gierth (though rather heavily modified by me).
Back-patch to 9.2 where this code was introduced, since the issue can
result in significant performance regressions compared to plans produced
by 9.1 and earlier.
2014-10-26 16:12:22 -04:00
..
data Improve key representation for GIN jsonb_ops, and fix existence-search bug. 2014-05-09 08:41:26 -04:00
expected Improve planning of btree index scans using ScalarArrayOpExpr quals. 2014-10-26 16:12:22 -04:00
input Add a basic atomic ops API abstracting away platform/architecture details. 2014-09-25 23:49:05 +02:00
output Add a basic atomic ops API abstracting away platform/architecture details. 2014-09-25 23:49:05 +02:00
sql Improve planning of btree index scans using ScalarArrayOpExpr quals. 2014-10-26 16:12:22 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
GNUmakefile Finish adding file version information to installed Windows binaries. 2014-08-18 22:59:53 -04:00
Makefile Remove remains of old depend target. 2007-01-20 17:16:17 +00:00
README Don't generate plain-text HISTORY and src/test/regress/README anymore. 2014-02-10 20:48:04 -05:00
parallel_schedule Fix some more problems with nested append relations. 2014-10-01 19:31:12 -04:00
pg_regress.c Secure Unix-domain sockets of "make check" temporary clusters. 2014-06-14 09:41:13 -04:00
pg_regress.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
pg_regress_main.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
regress.c Add a basic atomic ops API abstracting away platform/architecture details. 2014-09-25 23:49:05 +02:00
regressplans.sh Rename 'gmake' to 'make' in docs and recommended commands 2014-02-12 17:29:19 -05:00
resultmap Enable compiling with the mingw-w64 32 bit compiler. 2011-12-10 15:35:41 -05:00
serial_schedule Fix some more problems with nested append relations. 2014-10-01 19:31:12 -04:00
standby_schedule Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00

README

Documentation concerning how to run these regression tests and interpret
the results can be found in the PostgreSQL manual, in the chapter
"Regression Tests".