
How do you propose doing outer joins in non-mergejoin situations?
Mergejoins can only be used currently in equal joins.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Wed, 24 Feb 1999 04:53:21 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
OUTER joins
> 
> How do you propose doing outer joins in non-mergejoin situations?
> Mergejoins can only be used currently in equal joins.

Is your solution going to be to make sure the OUTER table is always a
MergeJoin, or on the outside of a join loop?  That could work.

That could get tricky if the table is joined to _two_ other tables. 
With the cleaned-up optimizer, we can disable non-merge joins in certain
circumstances, and prevent OUTER tables from being inner in the others. 
Is that the plan?

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Wed, 24 Feb 1999 05:27:07 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] OUTER joins
(back from a short vacation...)

> How do you propose doing outer joins in non-mergejoin situations?
> Mergejoins can only be used currently in equal joins.

Hadn't thought about it, other than figuring that implementing the
equi-join first was a good start. There is a class of outer join syntax
(the USING clause) which is implicitly an equi-join...

                        - Tom

Mon, 01 Mar 1999 17:10:49 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: OUTER joins
> (back from a short vacation...)
> 
> > How do you propose doing outer joins in non-mergejoin situations?
> > Mergejoins can only be used currently in equal joins.
> 
> Hadn't thought about it, other than figuring that implementing the
> equi-join first was a good start. There is a class of outer join syntax
> (the USING clause) which is implicitly an equi-join...

Not that easy.  You don't automatically get a mergejoin from an
equijoin.  I will have to force outer's to be either mergejoins, or
inners of non-merge joins.  Can you add code to non-merge joins in the
executor to throw out a null row if it does not find an inner match for
the outer row, and I will handle the optimizer so it doesn't throw a
non-conforming plan to the executor.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Sat, 6 Mar 1999 22:25:31 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: OUTER joins
> > Hadn't thought about it, other than figuring that implementing the
> > equi-join first was a good start. There is a class of outer join 
> > syntax (the USING clause) which is implicitly an equi-join...
> Not that easy.  You don't automatically get a mergejoin from an
> equijoin.  I will have to force outer's to be either mergejoins, or
> inners of non-merge joins.  Can you add code to non-merge joins in the
> executor to throw out a null row if it does not find an inner match 
> for the outer row, and I will handle the optimizer so it doesn't throw 
> a non-conforming plan to the executor.

So far I don't have enough info in the parser to get the
planner/optimizer going. Should we work from the front to the back, or
should I go ahead and look at the non-merge joins? It's painfully
obvious that I don't know anything about the middle parts of this to
proceed without lots more research.

                        - Tom

Tue, 09 Mar 1999 02:46:40 +0000
"Thomas G. Lockhart" <lockhart@alumni.caltech.edu>
Re: OUTER joins
> > > Hadn't thought about it, other than figuring that implementing the
> > > equi-join first was a good start. There is a class of outer join 
> > > syntax (the USING clause) which is implicitly an equi-join...
> > Not that easy.  You don't automatically get a mergejoin from an
> > equijoin.  I will have to force outer's to be either mergejoins, or
> > inners of non-merge joins.  Can you add code to non-merge joins in the
> > executor to throw out a null row if it does not find an inner match 
> > for the outer row, and I will handle the optimizer so it doesn't throw 
> > a non-conforming plan to the executor.
> 
> So far I don't have enough info in the parser to get the
> planner/optimizer going. Should we work from the front to the back, or
> should I go ahead and look at the non-merge joins? It's painfully
> obvious that I don't know anything about the middle parts of this to
> proceed without lots more research.

We need to do phone or IRC to discuss this. Let me know when.

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Mon, 8 Mar 1999 22:25:41 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: OUTER joins