pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Antonin Houska <ah@cybertec.at>
To: pgsql-hackers@postgresql.org
Subject: Re: Performance improvement for joins where outer side is unique
Date: Wed, 25 Jan 2017 16:56:21 +0100
Message-ID: <28690.1485359781@localhost> (raw)
In-Reply-To: <CAKJS1f9-WLTw78EkUgwbDLXz0Cn8qu6xHme-p4XNXO_Pwvm8OQ@mail.gmail.com>
References: <20150320.121140.148610378.horiguchi.kyotaro@lab.ntt.co.jp>
	<CAPpHfdviphQFjk-gaGZGGxLAyt=YuVdJLnntsxOKnU296s9u-Q@mail.gmail.com>
	<CAKJS1f-=1y0-f5FFV2_r7LtS+CL2Lw-nhJjXB3O_0FmBqnK=3A@mail.gmail.com>
	<27152324.eFKJb4Khb5@dinodell>
	<8608754a32d1325c2f83ba8b1df71585@xs4all.nl>
	<55DA1F9F.5040204@2ndquadrant.com>
	<CAKJS1f-9UTo6fA+h8rojd30CujSKscZamLn5YnKw5+ASbV0Wwg@mail.gmail.com>
	<5085.1440375543@sss.pgh.pa.us>
	<CAKJS1f_8hrzTDCu0pwERWj_dLZu-6DYFQJAtNT+vM6UeOn0kHw@mail.gmail.com>
	<8907.1440383377@sss.pgh.pa.us>
	<CAKJS1f8JCt15ngEP8sZO-JYYT8mS6HUP_CT0T6S_0ogk1kQt+Q@mail.gmail.com>
	<CAKJS1f_4hm3qwKeHYKftd+BQuYBgdNR+rk+XP_JW9EY-ALHZbQ@mail.gmail.com>
	<56718B15.6060507@2ndquadrant.com>
	<CAKJS1f_i7dGh9ytc0DuaX3JJaN7Gp9AGXNbdtWjj0PkPzNzUeg@mail.gmail.com>
	<5671FF0D.2010403@2ndquadrant.com>
	<CANP8+j+vxfEf3dqhnzKAnDopnnUM-Zjb90gNT=haEQNQePj9Mw@mail.gmail.com>
	<CAKJS1f8MpcL4_oS+n-vmnisd_8OMuZR2vyLETOF7ABSLk_iNZg@mail.gmail.com>
	<56A25A72.2090505@2ndquadrant.com>
	<CAKJS1f8S6FH_eH71SXmo_m2 ChSU8LL75pf5cpN4TH=ZQQ0dENg@mail.gmail.com>
	<30364.1459529562@sss.pgh.pa.us>
	<CAKJS1f8naKkOueF0yRaTPzErzyLHjcOCwKvVnr5a4rv4doNzHw@mail.gmail.com>
	<CAKJS1f_TwwnJoXFgmwY39L81u9e6HiRuO1dnnCy2EFuHLaeYCQ@mail.gmail.com>
	<21641.1459958757@sss.pgh.pa.us>
	<CAKJS1f9OrAkVywOvk5OhCoXOssGUmtYOQyhU8jFr_bZL+Xn6zQ@mail.gmail.com>
	<CAKJS1f_BxfNe3ixfz4S-g2RTodvjk82edcv9O9WtBqc9eUbWSA@mail.gmail.com>
	<11488.1460054978@sss.pgh.pa.us>
	<CAKJS1f96jZYcv69rN-N_d+SpFqB4-4yBt0p_+fyPY=ESmj7Jzg@mail.gmail.com>
	<CAKJS1f-cJS2byqdHr7=KFBMt22GsU1ij42OEZV6q8eorSdvztw@mail.gmail.com>
	<CAJrrPGctNgAuGZWojS=7_=pyhCY7qZZmCyZ8vJ4Emc5N1ODvBA@mail.gmail.com>
	<C446D35C-8C9A-4A4A-95A1-C1569F58C697@gmail.com>
	<21146.1480714016@sss.pgh.pa.us>
	<CAKJS1f_VX2z=XRSS=mCcCYYtBmVr-3YVeRVroS-WEOBAA4iVbg@mail.gmail.com>
	<CAKJS1f9-WLTw78EkUgwbDLXz0Cn8qu6xHme-p4XNXO_Pwvm8OQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

David Rowley <david.rowley@2ndquadrant.com> wrote:
> On 19 January 2017 at 11:06, David Rowley <david.rowley@2ndquadrant.com> wrote:
> > Old patch no longer applies, so I've attached a rebased patch. This
> > also re-adds a comment line which I mistakenly removed.
> 
> (meanwhile Andres commits 69f4b9c)
> 
> I should've waited a bit longer.
> 
> 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 */


-- 
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de, http://www.cybertec.at


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (131+ messages)  latest in thread

Message-ID: <28690.1485359781@localhost>
Permalink:  ../28690.1485359781@localhost/
Also on:    postgresql.org/message-id/28690.1485359781@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: ah@cybertec.at
  Subject: Re: Performance improvement for joins where outer side is unique
  In-Reply-To: <28690.1485359781@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox