From: | Zeyuan Hu <ferrishu3886(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-docs(at)postgresql(dot)org |
Subject: | Re: Possible documentation inaccuracy in optimizer README |
Date: | 2025-04-08 19:38:52 |
Message-ID: | CACvHWmZHCMLZBgkm__HOsn8oLudp9Wx_NVtsnyt8ihTVsfXnLA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Hello Tom,
Thanks for the clarification. I now understand the main goal of the
examples. I was confused by the remarks in the example "(other
possibilities will be excluded for lack of join clauses)" as this is not a
true statement: some possibilities are not shown for lack of join clauses
while others are not shown for the sake of simplicity. I think it would be
nice to add what you explained somewhere in the text to indicate this is a
partial example with the main goal of illustrating join rels that have no
linking clauses are not considered by the optimizer; I got the impression
that these two examples are to illustrate how DP works in the optimizer.
best
regards,
Zeyuan
On Mon, Apr 7, 2025 at 9:28 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Zeyuan Hu <ferrishu3886(at)gmail(dot)com> writes:
> > In
> https://github.com/postgres/postgres/tree/master/src/backend/optimizer,
> > there are two examples on the dynamic programming (DP) algorithm used in
> > the optimizer, which I think
> > have some inaccuracy:
>
> You're right that these examples do not consider the effects of
> clauses generated by the EquivalenceClass machinery. But I don't
> think the exposition would be improved by mentioning that here.
> The point of these examples is that we don't consider joining
> rels that have no linking clauses at all.
>
> We could possibly avoid the inaccuracy by making the examples use
> some other operators that are not equijoins. But I wonder if that
> would not be more confusing rather than less so.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | PG Doc comments form | 2025-04-08 21:21:06 | Missing "each" in `NegotiateProtocolVersion` protocol message format description |
Previous Message | PG Doc comments form | 2025-04-08 18:00:29 | gen_random_uuid random source clarification |