From: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: a path towards replacing GEQO with something better |
Date: | 2021-06-16 22:02:32 |
Message-ID: | CAFBsxsHPMvSCut4_Th9Nktg4PZ77SpFptm5NUngHtCWj_ZAe1g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 16, 2021 at 12:01 PM Robert Haas <robertmhaas(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Zhihong Yu | 2021-06-16 22:05:24 | Re: A qsort template |
Previous Message | Andres Freund | 2021-06-16 21:58:04 | Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints |