From e006a24ad152b3faec748afe8c1ff0829699b2e6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 14 Aug 2008 18:48:00 +0000 Subject: Implement SEMI and ANTI joins in the planner and executor. (Semijoins replace the old JOIN_IN code, but antijoins are new functionality.) Teach the planner to convert appropriate EXISTS and NOT EXISTS subqueries into semi and anti joins respectively. Also, LEFT JOINs with suitable upper-level IS NULL filters are recognized as being anti joins. Unify the InClauseInfo and OuterJoinInfo infrastructure into "SpecialJoinInfo". With that change, it becomes possible to associate a SpecialJoinInfo with every join attempt, which permits some cleanup of join selectivity estimation. That needs to be taken much further than this patch does, but the next step is to change the API for oprjoin selectivity functions, which seems like material for a separate patch. So for the moment the output size estimates for semi and especially anti joins are quite bogus. --- doc/src/sgml/indexam.sgml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/indexam.sgml b/doc/src/sgml/indexam.sgml index 760d8d1a206..393ccfa2dd1 100644 --- a/doc/src/sgml/indexam.sgml +++ b/doc/src/sgml/indexam.sgml @@ -1,4 +1,4 @@ - + Index Access Method Interface Definition @@ -879,7 +879,8 @@ amcostestimate (PlannerInfo *root, *indexSelectivity = clauselist_selectivity(root, indexQuals, - index->rel->relid, JOIN_INNER); + index->rel->relid, + JOIN_INNER, NULL); -- cgit v1.2.3