Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s6i4v-001Gnq-IV for pgsql-hackers@arkaria.postgresql.org; Tue, 14 May 2024 02:39:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s6i4u-008D3e-EH for pgsql-hackers@arkaria.postgresql.org; Tue, 14 May 2024 02:39:44 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s6i4t-008Cvk-HF for pgsql-hackers@lists.postgresql.org; Tue, 14 May 2024 02:39:44 +0000 Received: from m16.mail.163.com ([117.135.210.3]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1s6i4g-0007Qt-SB for pgsql-hackers@lists.postgresql.org; Tue, 14 May 2024 02:39:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=fO/0yg52lMuy1vr0AzgupkgFeobDU9hJJXekgbKIJsc=; b=HuJM8Pzl+VY6HudspyY/xbtoKkVGVsNkYSXVEv3wD1lz4a3gbljBHYo58aT1n4 l5co5zcuhgz8nj+dh3Y+jzrnOunuZMvySzbH3NgTqRzB9zaMzd7kpT+ezqsCYcRB WFSYAfb/vZiwGfWhaOkeCQ2qhXQ9ivhk5feAdQEuHQxow= Received: from 8235eee8a2a0 (unknown [140.205.118.151]) by gzga-smtp-mta-g1-4 (Coremail) with SMTP id _____wD3v8rYzkJmeJC3BQ--.8708S3; Tue, 14 May 2024 10:39:20 +0800 (CST) References: <87h6f4ncc6.fsf@163.com> User-agent: mu4e 1.10.7; emacs 29.1 From: Andy Fan To: Bruce Momjian Cc: PostgreSQL-development , pgsql-hackers@lists.postgresql.org Subject: Re: First draft of PG 17 release notes Date: Tue, 14 May 2024 10:32:14 +0800 In-reply-to: Message-ID: <87le4dktgn.fsf@163.com> MIME-Version: 1.0 Content-Type: text/plain X-CM-TRANSID: _____wD3v8rYzkJmeJC3BQ--.8708S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7KFWruFWUKFWxKFWkGF4kJFb_yoW8XFy5pr WvqFZIy3ykJF1DJ3s2qw1vv3WFyrWrtFWYqw1UJrn8Ar98WFn5Kr12krsxuF97Wr1Iq34x tFsrJr9Ig3WF9FDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zK0PhhUUUUU= X-Originating-IP: [140.205.118.151] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/xtbBZwbeU2V4HGQCwQABsL List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Bruce Momjian 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.gmail.com -- Best Regards Andy Fan