Re: Convert ALL SubLinks to ANY SubLinks - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: Convert ALL SubLinks to ANY SubLinks
Date
Msg-id 0ea8fe57-05c5-428e-936c-fe1dfaed2cc5@gmail.com
Whole thread Raw
In response to Convert ALL SubLinks to ANY SubLinks  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: Convert ALL SubLinks to ANY SubLinks
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: SQL Property Graph Queries (SQL/PGQ)
Next
From: Marcos Pegoraro
Date:
Subject: Re: Partial Mode in Aggregate Functions