Re: [HACKERS] Bushy Plans fixed

From: Vadim Mikheev <vadim(at)krs(dot)ru>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Bushy Plans fixed
Date: 1999-02-18 02:54:20
Message-ID: 36CB80DC.BAED2E03@krs.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
>
> I have fixed bushy plans, enabled with the postgres -b option. Here is
> proof from OPTIMIZER_DEBUG:

Nice!!!

> levels left: 7
> (9 8 7 6 ): size=1 width=16
> path list:
> Nestloop size=1 cost=0.000000
> MergeJoin size=1 cost=0.000000
> clauses=(x5.y = x6.y)
> sortouter=1 sortinner=1
> SeqScan(6) size=0 cost=0.000000
> SeqScan(7) size=0 cost=0.000000
> MergeJoin size=1 cost=0.000000
> clauses=(x7.y = x8.y)
> sortouter=1 sortinner=1
> SeqScan(8) size=0 cost=0.000000
> SeqScan(9) size=0 cost=0.000000
>
>
> The regression tests pass with bushy plans enabled. I am not sure if
> the executor is actually using a bushy plan, though.

Sure, it does.

>
> The old bushy code was poor. It tried to do bushy plans by modifying
> the joininfo nodes. I removed all that code, and just do the join
> search in make_rels_by_clause_joins(). This is much more logical, and
> does not require the joininfo setup/cleanup that the old code attempted.
>
> Frankly, I would like to enable bushy plans and right-handed plans by
> default. The optimizer is now fast enough that a 9-table join is almost
> instantaneous, even with bush plans. People are not sophisticated
> enough to know when to enables these options themselves. I am not sure I
> am either. I would like to enables both, fix whatever breaks, and
> programmatically enable the options when they make sense.

We need not in right-sided plans code any more.
I agreed that we should enable bushes by default.

Vadim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 1999-02-18 03:09:02 Re: [HACKERS] 8K block limit
Previous Message The Hermit Hacker 1999-02-18 01:58:42 Re: [HACKERS] Bushy Plans fixed