pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik.fearing@dalibo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-bugs@postgresql.org
Subject: Re: BUG #9896: Bug in FULL OUTER JOIN
Date: Mon, 07 Apr 2014 22:39:28 +0200
Message-ID: <53430D00.9040009@dalibo.com> (raw)
In-Reply-To: <28747.1396901878@sss.pgh.pa.us>
References: <20140407131705.342.75513@wrigleys.postgresql.org>
	<19141.1396884331@sss.pgh.pa.us>
	<28747.1396901878@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 04/07/2014 10:17 PM, Tom Lane wrote:
> 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?

And Oracle does it in two steps: http://www.sqlfiddle.com/#!4/607e0/1/0

-- 
Vik



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



view thread (5+ messages)

Message-ID: <53430D00.9040009@dalibo.com>
Permalink:  ../53430D00.9040009@dalibo.com/
Also on:    postgresql.org/message-id/53430D00.9040009@dalibo.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: vik.fearing@dalibo.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #9896: Bug in FULL OUTER JOIN
  In-Reply-To: <53430D00.9040009@dalibo.com>
  References: <20140407131705.342.75513@wrigleys.postgresql.org> <19141.1396884331@sss.pgh.pa.us> <28747.1396901878@sss.pgh.pa.us> <53430D00.9040009@dalibo.com>

* 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