Can someone comment on what Bushy plans do in the optimizer, and whether
the code has any value?

-- 
  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

Sun, 14 Feb 1999 13:35:03 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
bushy plans
Bruce Momjian wrote:
> 
> Can someone comment on what Bushy plans do in the optimizer, and whether
> the code has any value?

No, currently. But please don't remove them. It would be nice
to have bushy plans implemented.

Vadim

Mon, 15 Feb 1999 09:18:25 +0700
Vadim Mikheev <vadim@krs.ru>
Re: [HACKERS] bushy plans
> Can someone comment on what Bushy plans do in the optimizer, and whether
> the code has any value?

If anyone wants to research this, the driving field appears to be
in JoinInfo called 'inactive', soon to be called bushy_inactive.


-- 
  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

Sun, 14 Feb 1999 21:29:06 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] bushy plans
> Bruce Momjian wrote:
> > 
> > Can someone comment on what Bushy plans do in the optimizer, and whether
> > the code has any value?
> 
> No, currently. But please don't remove them. It would be nice
> to have bushy plans implemented.

Please tell me what they are supposed to do.  I can get it working, I
think.  I will not remove it.  I have ifdef'ed it, though.  If you tell
me what it is, I will check it to see if it works.

-- 
  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

Sun, 14 Feb 1999 21:36:11 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] bushy plans
Bruce Momjian wrote:
> 
> > Can someone comment on what Bushy plans do in the optimizer, and whether
> > the code has any value?
> 
> If anyone wants to research this, the driving field appears to be
> in JoinInfo called 'inactive', soon to be called bushy_inactive.

No - BushyPlanFlag.

Vadim

Mon, 15 Feb 1999 09:36:24 +0700
Vadim Mikheev <vadim@krs.ru>
Re: [HACKERS] bushy plans
> Bruce Momjian wrote:
> > 
> > > Can someone comment on what Bushy plans do in the optimizer, and whether
> > > the code has any value?
> > 
> > If anyone wants to research this, the driving field appears to be
> > in JoinInfo called 'inactive', soon to be called bushy_inactive.
> 
> No - BushyPlanFlag.

Yes, that enables Bushy Plans, but the work of bushy plans seems to be
driven by that field.

-- 
  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

Sun, 14 Feb 1999 21:38:43 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] bushy plans
Bruce Momjian wrote:
> 
> > Bruce Momjian wrote:
> > >
> > > Can someone comment on what Bushy plans do in the optimizer, and whether
> > > the code has any value?
> >
> > No, currently. But please don't remove them. It would be nice
> > to have bushy plans implemented.
> 
> Please tell me what they are supposed to do.  I can get it working, I
> think.  I will not remove it.  I have ifdef'ed it, though.  If you tell
> me what it is, I will check it to see if it works.

It doesn't work (failed assertion).

Well, currently both geqo and old optimizer produces
left-sided plans: inner relation of an join is always
_base_ relation (not join relation). In bushy plans
both outer and inner relations may be join ones.
~1.5 - 2 years ago I added right-sided plans:
outer relation is base, inner relation may be join.
Sometimes right-sided plans are 30% faster than left-sided.
Bushy plans could be more faster...
BTW, I broke execution of right-sided plans ~ 1 year ago
while implementing subqueries (near materialization node)
and still have no time to fix it (seems no one except me
used them so I didn't worry about this -:)).

Vadim

Mon, 15 Feb 1999 10:02:44 +0700
Vadim Mikheev <vadim@krs.ru>
Re: [HACKERS] bushy plans
> > Please tell me what they are supposed to do.  I can get it working, I
> > think.  I will not remove it.  I have ifdef'ed it, though.  If you tell
> > me what it is, I will check it to see if it works.
> 
> It doesn't work (failed assertion).
> 
> Well, currently both geqo and old optimizer produces
> left-sided plans: inner relation of an join is always
> _base_ relation (not join relation). In bushy plans
> both outer and inner relations may be join ones.
> ~1.5 - 2 years ago I added right-sided plans:
> outer relation is base, inner relation may be join.
> Sometimes right-sided plans are 30% faster than left-sided.
> Bushy plans could be more faster...
> BTW, I broke execution of right-sided plans ~ 1 year ago
> while implementing subqueries (near materialization node)
> and still have no time to fix it (seems no one except me
> used them so I didn't worry about this -:)).

This explaination helps greatly.  This clears up what is happening in
the code.  I will keep the bushy stuff, and see if I can get it working,
though if the problem is outside of the optimizer, I will have trouble.

-- 
  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, 15 Feb 1999 00:31:43 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] bushy plans

One more thing.  The optimizer was in terrible shape.  It is just like
the parser and rewrite system before someone went through those and
cleaned them up and fixed the bugs.

We get few reports of optimizer problems, so I was unaware of just how
broken it was.

-- 
  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, 15 Feb 1999 00:57:06 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] bushy plans
Bruce Momjian wrote:
> 
> > BTW, I broke execution of right-sided plans ~ 1 year ago
> > while implementing subqueries (near materialization node)
> > and still have no time to fix it (seems no one except me
> > used them so I didn't worry about this -:)).
> 
> This explaination helps greatly.  This clears up what is happening in
> the code.  I will keep the bushy stuff, and see if I can get it working,
> though if the problem is outside of the optimizer, I will have trouble.
                           ^^^^^^^^^^^^^^^^^^^^^^^^
I'll help with executor if you'll fix bushy plans generation.

Vadim

Mon, 15 Feb 1999 14:06:40 +0700
Vadim Mikheev <vadim@krs.ru>
Re: [HACKERS] bushy plans