Skip site navigation (1) Skip section navigation (2)

Odd plan shown in src/backend/optimizer/README

From: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Odd plan shown in src/backend/optimizer/README
Date: 2017-01-23 10:11:46
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
While working on a bug in postgres_fdw, I found this:

          -> Seq Scan on SmallTable1 A
              -> Seq Scan on SmallTable2 B
                  -> 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

Attachment: optimizer-readme.patch
Description: text/x-patch (913 bytes)


pgsql-hackers by date

Next:From: Amit KapilaDate: 2017-01-23 10:17:36
Subject: Re: pageinspect: Hash index support
Previous:From: Etsuro FujitaDate: 2017-01-23 09:56:07
Subject: Re: postgres_fdw bug in 9.6

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group