From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | John Naylor <john(dot)naylor(at)enterprisedb(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 16:01:09 |
Message-ID: | CA+TgmoZESkC+n_0r15ZSoavb-SpJVo1N7+_30Q5ax6u5WN2iqg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 15, 2021 at 2:16 PM John Naylor
<john(dot)naylor(at)enterprisedb(dot)com> wrote:
> > I don't quite understand the difference between the "chain" case and
> > the "star" case. Can you show sample queries for each one? e.g. SELECT
> > ... FROM a_1, a_2, ..., a_n WHERE <something>?
>
> SELECT *
> FROM tab1, tab2, tab3, tab4
> WHERE tab1.col = tab2.col AND
> tab2.col = tab3.col AND
> tab3.col = tab4.col
>
> SELECT *
> FROM tab1, tab2, tab3, tab4
> WHERE tab1.col = tab2.col AND
> tab1.col = tab3.col AND
> tab1.col = tab4.col
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?
--
Robert Haas
EDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2021-06-16 16:03:29 | Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic |
Previous Message | Tom Lane | 2021-06-16 16:00:57 | Re: snapshot too old issues, first around wraparound and then more. |