From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Support "Right Anti Join" plan shapes. |
Date: | 2023-04-05 20:59:25 |
Message-ID: | E1pkAE0-001Y6Q-9z@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-04-05 21:20:12 | pgsql: bufmgr: Support multiple in-progress IOs by using resowner |
Previous Message | Andres Freund | 2023-04-05 20:49:24 | pgsql: bufmgr: Acquire and clean victim buffer separately |