Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1am2Ks-0000kY-G8 for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Apr 2016 16:54:14 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1am2Ks-0001QJ-1d for pgsql-hackers@arkaria.postgresql.org; Fri, 01 Apr 2016 16:54:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1am2JW-0008LJ-Lx for pgsql-hackers@postgresql.org; Fri, 01 Apr 2016 16:52:50 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1am2JP-0005SA-Sa for pgsql-hackers@postgresql.org; Fri, 01 Apr 2016 16:52:49 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u31GqgaW030365; Fri, 1 Apr 2016 12:52:42 -0400 From: Tom Lane To: David Rowley cc: Tomas Vondra , Simon Riggs , PostgreSQL-development Subject: Re: Performance improvement for joins where outer side is unique In-reply-to: References: <20150320.121140.148610378.horiguchi.kyotaro@lab.ntt.co.jp> <27152324.eFKJb4Khb5@dinodell> <8608754a32d1325c2f83ba8b1df71585@xs4all.nl> <55DA1F9F.5040204@2ndquadrant.com> <5085.1440375543@sss.pgh.pa.us> <8907.1440383377@sss.pgh.pa.us> <56718B15.6060507@2ndquadrant.com> <5671FF0D.2010403@2ndquadrant.com> <56A25A72.2090505@2ndquadrant.com> <24304.145748278! 0@sss.pgh.pa.us> <13653.1457731978@sss.pgh.pa.us> <16023.1457736190@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Mon, 14 Mar 2016 01:06:33 +1300" Date: Fri, 01 Apr 2016 12:52:42 -0400 Message-ID: <30364.1459529562@sss.pgh.pa.us> X-Pg-Spam-Score: -2.9 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org David Rowley writes: > On 12 March 2016 at 11:43, Tom Lane wrote: >> It seems like the major intellectual complexity here is to figure out >> how to detect inner-side-unique at reasonable cost. I see that for >> LEFT joins you're caching that in the SpecialJoinInfos, which is probably >> fine. But for INNER joins it looks like you're just doing it over again >> for every candidate join, and that seems mighty expensive. > I have a rough idea for this, but I need to think of it a bit more to > make sure it's bulletproof. Where are we on this? I had left it alone for awhile because I supposed that you were going to post a new patch, but it's been a couple weeks... regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers