On 26/2/26 08:11, Richard Guo wrote:
Attached is a draft patch illustrating the idea.  Any thoughts or
interest in this transformation?
Thanks for sharing your thoughts.
I want to correct your statement on the 'no regression' phrase. In practice, users often report issues after each new sublink transformation goes live.

This happens because the transformation changes the 'join problem' order. Before, the subplan's join list was handled independently, but now its relations are mixed with those from higher levels. If the join collapse limit is exceeded, this can sometimes cause much worse performance than in earlier Postgres versions.

A recent example of this issue, where a query increased from 9 joins in PG14 to 18 joins in PG19, can be found in pgsql-performance [1].

[1] https://www.postgresql.org/message-id/flat/ECA94B5A-E5B4-45F7-B1B4-9BF754083164%40gmx.net

--
regards, Andrei Lepikhov,
pgEdge


Reply via email to