On Tue, May 14, 2024 at 10:32:14AM +0800, Andy Fan wrote: > Bruce Momjian <br...@momjian.us> writes: > > It was unclear from the commit message exactly what user-visible > > optimization this allowed. Do you have details? > > Yes, It allows the query like "SELECT * FROM t1 WHERE t1.a in (SELECT a > FROM t2 WHERE t2.b = t1.b)" be pulled up a semi join, hence more join > methods / join orders are possible. > > > Yes, for example: (subquery-1) UNION ALL (subquery-2) LIMIT n; > > When planning the subquery-1 or subquery-2, limit N should be > considered. As a consequence, maybe hash join should be replaced with > Nested Loop. Before this commits, it is ignored if it is flatten into > appendrel, and the "flatten" happens very often. > > David provided a summary for the both commits in [1].
Okay, attached patch applied. -- Bruce Momjian <br...@momjian.us> https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.
diff --git a/doc/src/sgml/release-17.sgml b/doc/src/sgml/release-17.sgml index 38c14970822..fa0a703629c 100644 --- a/doc/src/sgml/release-17.sgml +++ b/doc/src/sgml/release-17.sgml @@ -356,6 +356,28 @@ Improve optimization of range values when using containment operators <@ and </para> </listitem> +<!-- +Author: Alexander Korotkov <akorot...@postgresql.org> +2024-02-15 [9f1337639] Pull up ANY-SUBLINK with the necessary lateral support. +--> + +<listitem> +<para> +Allow correlated IN subqueries to be transformed into joins (Andy Fan, Tom Lane) +</para> +</listitem> + +<!-- +Author: David Rowley <drow...@postgresql.org> +2023-10-05 [a8a968a82] Consider cheap startup paths in add_paths_to_append_rel +--> + +<listitem> +<para> +Improve optimization of the LIMIT clause on partitioned tables, inheritance parents, and UNION ALL queries (Andy Fan, David Rowley) +</para> +</listitem> + <!-- Author: Tom Lane <t...@sss.pgh.pa.us> 2023-07-14 [e08d74ca1] Allow plan nodes with initPlans to be considered paralle