mirror of
https://github.com/postgres/postgres.git
synced 2025-12-19 17:02:53 +03:00
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
This commit is contained in:
@@ -2766,8 +2766,9 @@ typedef struct PlaceHolderVar
|
||||
* min_lefthand and min_righthand for higher joins.)
|
||||
*
|
||||
* jointype is never JOIN_RIGHT; a RIGHT JOIN is handled by switching
|
||||
* the inputs to make it a LEFT JOIN. So the allowed values of jointype
|
||||
* in a join_info_list member are only LEFT, FULL, SEMI, or ANTI.
|
||||
* the inputs to make it a LEFT JOIN. It's never JOIN_RIGHT_ANTI either.
|
||||
* So the allowed values of jointype in a join_info_list member are only
|
||||
* LEFT, FULL, SEMI, or ANTI.
|
||||
*
|
||||
* ojrelid is the RT index of the join RTE representing this outer join,
|
||||
* if there is one. It is zero when jointype is INNER or SEMI, and can be
|
||||
|
||||
Reference in New Issue
Block a user