Commit 3c821466 authored by Tom Lane's avatar Tom Lane

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
parent c0ef456b
...@@ -757,9 +757,8 @@ to create a plan like ...@@ -757,9 +757,8 @@ to create a plan like
-> Seq Scan on SmallTable1 A -> Seq Scan on SmallTable1 A
NestLoop NestLoop
-> Seq Scan on SmallTable2 B -> Seq Scan on SmallTable2 B
NestLoop -> Index Scan using XYIndex on LargeTable C
-> Index Scan using XYIndex on LargeTable C Index Condition: C.X = A.AID and C.Y = B.BID
Index Condition: C.X = A.AID and C.Y = B.BID
so we should be willing to pass down A.AID through a join even though so we should be willing to pass down A.AID through a join even though
there is no join order constraint forcing the plan to look like this. there is no join order constraint forcing the plan to look like this.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment