Re: [HACKERS] Bushy Plans fixed

Поиск
Список
Период
Сортировка
От Vadim Mikheev
Тема Re: [HACKERS] Bushy Plans fixed
Дата
Msg-id 36CB80DC.BAED2E03@krs.ru
обсуждение исходный текст
Ответ на Bushy Plans fixed  (Bruce Momjian <maillist@candle.pha.pa.us>)
Ответы Re: [HACKERS] Bushy Plans fixed  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: [HACKERS] Bushy Plans fixed
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: [HACKERS] 8K block limit