Odd plan shown in src/backend/optimizer/README
Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
From: Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>
To: pgsql-hackers@postgresql.org
Date: 2017-01-23T10:11:46Z
Lists: pgsql-hackers
Attachments
- optimizer-readme.patch (text/x-patch) patch
- (unnamed) (text/plain)
While working on a bug in postgres_fdw, I found this:
NestLoop
-> Seq Scan on SmallTable1 A
NestLoop
-> Seq Scan on SmallTable2 B
NestLoop
-> Index Scan using XYIndex on LargeTable C
Index Condition: C.X = A.AID and C.Y = B.BID
This seems odd to me; we would not need the bottom-level Nestloop.
Attached is a small patch for fixing that. I also adjusted the
indentation to the last line "Index Condition: ...", to match others in
the section of Parameterized Paths.
Best regards,
Etsuro Fujita
Commits
-
Fix example plan in optimizer/README.
- 3c821466abcd 10.0 landed