Skip to content

Commit 3c82146

Browse files
committed
Fix example plan in optimizer/README.
Joining three tables only takes two join nodes. I think when I (tgl) wrote this, I was envisioning possible additional joins; but since the example doesn't show any fourth table, it's just confusing to write a third join node. Etsuro Fujita Discussion: https://postgr.es/m/e6cfbaa3-af02-1abc-c25e-8fa5c6bc4e21@lab.ntt.co.jp
1 parent c0ef456 commit 3c82146

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/backend/optimizer/README

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,8 @@ to create a plan like
757757
-> Seq Scan on SmallTable1 A
758758
NestLoop
759759
-> Seq Scan on SmallTable2 B
760-
NestLoop
761-
-> Index Scan using XYIndex on LargeTable C
762-
Index Condition: C.X = A.AID and C.Y = B.BID
760+
-> Index Scan using XYIndex on LargeTable C
761+
Index Condition: C.X = A.AID and C.Y = B.BID
763762

764763
so we should be willing to pass down A.AID through a join even though
765764
there is no join order constraint forcing the plan to look like this.

0 commit comments

Comments
 (0)