postgresql/src
David Rowley b592422095 Relax overly strict rules in select_outer_pathkeys_for_merge()
The select_outer_pathkeys_for_merge function made an attempt to build the
merge join pathkeys in the same order as query_pathkeys.  This was done as
it may have led to no sort being required for an ORDER BY or GROUP BY
clause in the upper planner.  However, this restriction seems overly
strict as it required that we match the query_pathkeys entirely or we
don't bother putting the merge join pathkeys in that order.

Here we relax this rule so that we use a prefix of the query_pathkeys
providing that prefix matches all of the join quals.  This may provide the
upper planner with partially sorted input which will allow the use of
incremental sorts instead of full sorts.

Author: David Rowley
Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/CAApHDvrtZu0PHVfDPFM4Yx3jNR2Wuwosv+T2zqa7LrhhBr2rRg@mail.gmail.com
2022-08-02 11:02:46 +12:00
..
backend Relax overly strict rules in select_outer_pathkeys_for_merge() 2022-08-02 11:02:46 +12:00
bin Fix error reporting after ioctl() call with pg_upgrade --clone 2022-08-01 16:38:23 +09:00
common Fix get_dirent_type() for symlinks on MinGW/MSYS. 2022-07-28 14:26:12 +12:00
fe_utils Add xheader_width pset option to psql 2022-07-25 14:25:02 -04:00
include Have ExecFindPartition cache the last found partition 2022-08-02 09:55:27 +12:00
interfaces Fix [install]check in interfaces/libpq/Makefile 2022-07-22 20:15:11 +02:00
makefiles Default to hidden visibility for extension libraries where possible 2022-07-17 17:49:51 -07:00
pl Add PGDLLEXPORTS to some plpgsql function declarations 2022-07-20 10:24:50 +02:00
port Remove dead getpwuid_r replacement code. 2022-07-24 09:44:29 +12:00
template Remove HP-UX port. 2022-07-08 14:05:05 +12:00
test Relax overly strict rules in select_outer_pathkeys_for_merge() 2022-08-02 11:02:46 +12:00
timezone Update time zone data files to tzdata release 2022a. 2022-05-05 14:54:53 -04:00
tools Split TuplesortPublic from Tuplesortstate 2022-07-27 08:28:10 +03:00
tutorial Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Increase minimum supported GNU make version to 3.81. 2022-07-23 12:12:42 -04:00
Makefile.shlib Default to hidden visibility for extension libraries where possible 2022-07-17 17:49:51 -07:00
nls-global.mk Fix for make unportability 2022-07-13 09:15:01 +02:00