Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXFzY-000824-8l for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Apr 2014 20:18:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WXFzX-0005Mt-PG for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Apr 2014 20:18:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXFzX-0005Mn-79 for pgsql-bugs@postgresql.org; Mon, 07 Apr 2014 20:18:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WXFzT-0006Ak-Sk for pgsql-bugs@postgresql.org; Mon, 07 Apr 2014 20:18:02 +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 s37KHwSM028748 for ; Mon, 7 Apr 2014 16:17:58 -0400 From: Tom Lane To: pgsql-bugs@postgresql.org Subject: Re: BUG #9896: Bug in FULL OUTER JOIN In-reply-to: <19141.1396884331@sss.pgh.pa.us> References: <20140407131705.342.75513@wrigleys.postgresql.org> <19141.1396884331@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 07 Apr 2014 11:25:31 -0400" Date: Mon, 07 Apr 2014 16:17:58 -0400 Message-ID: <28747.1396901878@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org I wrote: > sqlpro@sqlspot.com writes: >> SELECT * >> FROM T_CLIENT_CLI AS C >> FULL OUTER JOIN T_PROSPECT_PSP AS P >> ON C.CLI_SIREN = P.PSP_SIREN >> OR C.CLI_ENSEIGNE = P.PSP_ENSEIGNE; > Can you show us the query plans used by those systems? For the archives' sake: the OP sent me a not-too-useful screen shot in which SQL Server claims it's using a merge join for this query. I find this less than credible: what linear sort order would bring together all the potentially joinable rows? If they're getting the right answer at all, there must be some secret sauce in there someplace. Perhaps they're just Doing It The Hard Way with state storage proportional to the size of the relations? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs