On Wed, Jun 16, 2021 at 12:01 PM Robert Haas <robertmh...@gmail.com> wrote: > > I feel like these are completely equivalent. Either way, the planner > is going to deduce that all the ".col" columns are equal to each other > via the equivalence class machinery, and then the subsequent planning > will be absolutely identical. Or am I missing something?
Ok, I've modified the examples so it reflects the distinction: A chain has join predicates linking relations in a linear sequence: SELECT * FROM tab1, tab2, tab3, tab4 WHERE tab1.a = tab2.b AND tab2.i = tab3.j AND tab3.x = tab4.y A star has a hub with join predicates to multiple spokes: SELECT * FROM tab1, tab2, tab3, tab4 WHERE tab1.f1 = tab2.d1 AND tab1.f2 = tab3.d2 AND tab1.f3 = tab4.d3 -- John Naylor EDB: http://www.enterprisedb.com