Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLU9h-0004zs-4r for pgsql-committers@arkaria.postgresql.org; Fri, 27 Jan 2023 19:12:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pLU9f-0004dp-W7 for pgsql-committers@arkaria.postgresql.org; Fri, 27 Jan 2023 19:12:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLU9f-0004df-5z for pgsql-committers@lists.postgresql.org; Fri, 27 Jan 2023 19:12:55 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pLU9b-0002OS-Oj for pgsql-committers@lists.postgresql.org; Fri, 27 Jan 2023 19:12:54 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 679365C0150; Fri, 27 Jan 2023 14:12:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 27 Jan 2023 14:12:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1674846769; x=1674933169; bh=y MEnp9O6XUKkj40gejg0rpmhn0mS3VW21+mdWlWIzwE=; b=M4tSvJHEZoObiNWAN udZP9Nq0oq3rem7H2Ebh/d4Zs6pyPNWv6hWKZY8AL7FpOKJsIgbb+hnoe4a8mQ/v /lW1znmv0UqCtbF4o4yZIQD+hZEpCWkYtnxqsk6/77UiYo7VqrAN/24yXXKCYNYf vO53c1Wp1khvEMTVKY/UYBhzbWCRCvRLxkThiNangthRr2mbLmTEpvXajFm/CdKt 7199GG0jZjv2vmfUXSxo0UrGclmAoAs9N+NVtkgOGokoNforgILXrX/oHImZRZ/W Az5SDojqfbr/3fX3HVT2Kjxq56VgfoYb9DePbz9fLoKiytQy10hU8VGRrXx8ZKBy /fIkw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddviedguddvudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhv rghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorh hgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeej keffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Jan 2023 14:12:48 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C917C98; Fri, 27 Jan 2023 20:00:05 +0100 (CET) Date: Fri, 27 Jan 2023 20:00:05 +0100 From: Alvaro Herrera To: David Rowley Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Teach planner about more monotonic window functions Message-ID: <20230127190005.kthdwmkrg434vxtp@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2023-Jan-27, David Rowley wrote: > Teach planner about more monotonic window functions > > 9d9c02ccd introduced runConditions for window functions to allow > monotonic window function evaluation to be made more efficient when the > window function value went beyond some value that it would never go back > from due to its monotonic nature. That commit added prosupport functions > to inform the planner that row_number(), rank(), dense_rank() and some > forms of count(*) were monotonic. Here we add support for ntile(), > cume_dist() and percent_rank(). I think this commit missed a catversion bump. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/