Обсуждение: pgsql: Support "Right Anti Join" plan shapes.

Поиск
Список
Период
Сортировка

pgsql: Support "Right Anti Join" plan shapes.

От
Tom Lane
Дата:
Support "Right Anti Join" plan shapes.

Merge and hash joins can support antijoin with the non-nullable input
on the right, using very simple combinations of their existing logic
for right join and anti join.  This gives the planner more freedom
about how to order the join.  It's particularly useful for hash join,
since we may now have the option to hash the smaller table instead
of the larger.

Richard Guo, reviewed by Ronan Dunklau and myself

Discussion: https://postgr.es/m/CAMbWs48xh9hMzXzSy3VaPzGAz+fkxXXTUbCLohX1_L8THFRm2Q@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/16dc2703c5413534d4989e08253e8f4fcb0e2aab

Modified Files
--------------
src/backend/commands/explain.c               |   3 +
src/backend/executor/nodeHashjoin.c          |  35 ++--
src/backend/executor/nodeMergejoin.c         |  33 ++--
src/backend/optimizer/path/costsize.c        |   3 +-
src/backend/optimizer/path/joinpath.c        |  49 +++--
src/backend/optimizer/path/joinrels.c        |   3 +
src/backend/optimizer/path/pathkeys.c        |  10 +-
src/backend/optimizer/prep/prepjointree.c    |  14 +-
src/include/nodes/execnodes.h                |   3 +-
src/include/nodes/nodes.h                    |   4 +-
src/include/nodes/pathnodes.h                |   5 +-
src/test/regress/expected/partition_join.out | 276 ++++++++++++++-------------
12 files changed, 244 insertions(+), 194 deletions(-)