From: Andy Fan <zhihuifan1213@163.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: First draft of PG 17 release notes
Date: Tue, 14 May 2024 10:32:14 +0800
Message-ID: <87le4dktgn.fsf@163.com> (raw)
In-Reply-To: <ZkK3fm599U2rnRdd@momjian.us>
References: <ZjxLJpnH4VMkOMmi@momjian.us>
<87h6f4ncc6.fsf@163.com>
<ZkK3fm599U2rnRdd@momjian.us>
Bruce Momjian <bruce@momjian.us> writes:
> On Sat, May 11, 2024 at 01:27:25PM +0800, Andy Fan wrote:
>>
>> Hello Bruce,
>>
>> > I have committed the first draft of the PG 17 release notes; you can
>> > see the results here:
>> >
>> > https://momjian.us/pgsql_docs/release-17.html
>>
>> Thank you for working on this!
>>
>> > I welcome feedback. For some reason it was an easier job than usual.
>>
>> Do you think we need to add the following 2 items?
>>
>> - 9f133763961e280d8ba692bcad0b061b861e9138 this is an optimizer
>> transform improvement.
>
> 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.
>
>> - a8a968a8212ee3ef7f22795c834b33d871fac262 this is an optimizer costing
>> improvement.
>
> Does this allow faster UNION ALL with LIMIT, perhaps?
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].
[1]
https://www.postgresql.org/message-id/CAApHDvqAQgq27LgYmJ85VVGTR0%3DhRW6HHq2oZgK0ZiYC_a%2BEww%40mail...
--
Best Regards
Andy Fan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: zhihuifan1213@163.com, bruce@momjian.us, pgsql-hackers@lists.postgresql.org
Subject: Re: First draft of PG 17 release notes
In-Reply-To: <87le4dktgn.fsf@163.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox