Re: How is bushy plans generated in join_search_one_lev

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: How is bushy plans generated in join_search_one_lev
Date: 2020-08-27 00:05:04
Message-ID: 2987895.1598486704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> writes:
> I do see the README says we support bushy plans and I also see bushy
> plans in real life (for example tpc-h Q20) like below. However I don't know
> how it is generated with the algorithm in join_search_one_lev since it
> always
> make_rels_by_clause_join with joinrel[1] which is initial_rels which is
> baserel.

Hmm? Bushy plans are created by the second loop in join_search_one_level,
starting about line 150 in joinrels.c.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2020-08-27 00:46:23 Re: How is bushy plans generated in join_search_one_lev
Previous Message Alvaro Herrera 2020-08-26 23:40:07 Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY