Re: a path towards replacing GEQO with something better
| От | John Naylor |
|---|---|
| Тема | Re: a path towards replacing GEQO with something better |
| Дата | |
| Msg-id | CAFBsxsHPMvSCut4_Th9Nktg4PZ77SpFptm5NUngHtCWj_ZAe1g@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: a path towards replacing GEQO with something better (Robert Haas <robertmhaas@gmail.com>) |
| Список | pgsql-hackers |
On Wed, Jun 16, 2021 at 12:01 PM Robert Haas <robertmhaas@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
>
> 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
В списке pgsql-hackers по дате отправления: