Re: How is bushy plans generated in join_search_one_lev - Mailing list pgsql-hackers

From Andy Fan
Subject Re: How is bushy plans generated in join_search_one_lev
Date
Msg-id CAKU4AWqTMSukLc_PnaftXBVnMS2A=KO17V3eDpdypFWKB=c+nQ@mail.gmail.com
Whole thread Raw
In response to Re: How is bushy plans generated in join_search_one_lev  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


On Thu, Aug 27, 2020 at 8:05 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Andy Fan <zhihui.fan1213@gmail.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

Yes.. I missed the second loop:(:(:( 

--
Best Regards
Andy Fan

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: How is bushy plans generated in join_search_one_lev
Next
From: "tsunakawa.takay@fujitsu.com"
Date:
Subject: RE: Implement UNLOGGED clause for COPY FROM