pgsql: Support "Right Anti Join" plan shapes. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Support "Right Anti Join" plan shapes.
Date
Msg-id E1pkAE0-001Y6Q-9z@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: bufmgr: Acquire and clean victim buffer separately
Next
From: Andres Freund
Date:
Subject: pgsql: bufmgr: Support multiple in-progress IOs by using resowner