Re: Possible documentation inaccuracy in optimizer README

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zeyuan Hu <ferrishu3886(at)gmail(dot)com>
Cc: pgsql-docs(at)postgresql(dot)org
Subject: Re: Possible documentation inaccuracy in optimizer README
Date: 2025-04-08 04:28:07
Message-ID: 3887651.1744086487@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Yaroslav Saburov 2025-04-08 06:10:53 Re: generated constraint name
Previous Message Zeyuan Hu 2025-04-08 02:32:01 Possible documentation inaccuracy in optimizer README