Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cWPxR-0004IL-F1 for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jan 2017 15:58:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cWPxQ-0000ED-V0 for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jan 2017 15:58:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cWPvy-000708-LI for pgsql-hackers@postgresql.org; Wed, 25 Jan 2017 15:56:30 +0000 Received: from mx1.mailbox.org ([80.241.60.212]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cWPvu-00053C-U4 for pgsql-hackers@postgresql.org; Wed, 25 Jan 2017 15:56:30 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 6B77545290 for ; Wed, 25 Jan 2017 16:56:25 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id gaCH7oKKzwOb for ; Wed, 25 Jan 2017 16:56:22 +0100 (CET) From: Antonin Houska To: pgsql-hackers@postgresql.org 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> <30364.1459529562@sss.pgh.pa.us> <21641.1459958757@sss.pgh.pa.us> <11488.1460054978@sss.pgh.pa.us> <21146.1480714016@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Thu, 19 Jan 2017 12:29:15 +1300." MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 25 Jan 2017 16:56:21 +0100 Message-ID: <28690.1485359781@localhost> X-Pg-Spam-Score: -2.6 (--) 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 wrote: > On 19 January 2017 at 11:06, David Rowley = wrote: > > Old patch no longer applies, so I've attached a rebased patch. This > > also re-adds a comment line which I mistakenly removed. >=20 > (meanwhile Andres commits 69f4b9c) >=20 > I should've waited a bit longer. >=20 > Here's another that fixes the new conflicts. I suspect that "inner" and "outer" relation / tuple are sometimes confused = in comments: * analyzejoins.c:70 "searches for subsequent matching outer tuples." * analyzejoins.c:972 /* * innerrel_is_unique * Check for proofs which prove that 'innerrel' can, at most, match a * single tuple in 'outerrel' based on the join condition in * 'restrictlist'. */ * relation.h:1831 bool inner_unique; /* inner side of join matches no more than one * outer side tuple */ --=20 Antonin Houska Cybertec Sch=C3=B6nig & Sch=C3=B6nig GmbH Gr=C3=B6hrm=C3=BChlgasse 26 A-2700 Wiener Neustadt Web: http://www.postgresql-support.de, http://www.cybertec.at --=20 Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers