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 1nZL57-0000gj-4s for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Mar 2022 23:16: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 1nZL55-0007xd-Bp for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Mar 2022 23:16: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 1nZL53-0007x4-Id for pgsql-hackers@lists.postgresql.org; Tue, 29 Mar 2022 23:16:55 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nZL4x-00037W-K9 for pgsql-hackers@lists.postgresql.org; Tue, 29 Mar 2022 23:16:53 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 928A7320206E; Tue, 29 Mar 2022 19:16:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 29 Mar 2022 19:16:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=xOo7EAEPPLAYUShFu5asDyfr3odW4BDysuP9zB 9rdXI=; b=jDHJeSdVdmp6I5s9VAINdzyOJ1uYs86jMdSy8jTnS6bJCe6n1nHyoo mcfZrGXqQs12GuGFyOjBPVSI+QxgVWKjZgMJKMpQWWW1MvK3OJrZgiziIKt6ZLqm 7TE/drlYtBVN2Lpa85C+3ZEvxM5VdRQCrRaL3JICCj67QtrspkYeHRAWu3syMj2n ByS1mHi0OYDjQeZCKKhEznZ389PmFOamMCysoJdE8S/eNQbyvqS04o/1OEgAFeQU ShRTVqm5yUw+nJcbUfAaFQCyjIBQ806O7EjAdxb8tu5bK70e0KF2pa6U+AduVc7E QuTYT+V1tnDNA92RQqtQr5Z72pxou7Dw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=xOo7EAEPPLAYUShFu 5asDyfr3odW4BDysuP9zB9rdXI=; b=foUjBv4NGfYkmyDVaoTudAMkT79XkMJd1 6qvaq4yBYGPocbE881cOha/fc9qea3KYgQJGbDUEDHHV5aFo4mekOZ3ByaNpZIDd zmrVURUTg6K8w9krTge4yTgY/dPk44ykF78XSZFKvLg6/4DLiPVEbM7+eCttVuai Tw3Eb52P6xg8NYqrQttrvYgWN+Y/5fKDst8YcWBTRHbFieTcKndDWrQxt9tAfkA7 mlWUnnZ2aqVvWnTedfJlPJMIWqo9YBc263X6Sp4QmyhOkouIlK2DjguWTfbG7La6 3r6yANfDzCIEbjo/qVq+k82OijWuv0eSXT3umKOBxMr//K9ywMIng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeiuddgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpedukefhkeelueegveetheelffffjeegleeuudelfeefuedtleffueejfffh ueffudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grnhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 29 Mar 2022 19:16:42 -0400 (EDT) Date: Tue, 29 Mar 2022 16:16:41 -0700 From: Andres Freund To: David Rowley Cc: Robert Haas , Julien Rouhaud , Magnus Hagander , Justin Pryzby , PostgreSQL Hackers Subject: Re: Add parameter jit_warn_above_fraction Message-ID: <20220329231641.ai3qrzpdo2vqvwix@alap3.anarazel.de> References: <20220225162304.GD9008@telsasoft.com> <20220321235048.wb3ymun6lbi33b2u@alap3.anarazel.de> <20220329100846.3iedk5ear3ewdi5j@jrouhaud> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2022-03-30 09:05:44 +1300, David Rowley wrote: > I really believe that the main problem here is that JIT only enables > when the *total* plan cost reaches a certain threshold. Yes, that is/was a clear design mistake. It wasn't quite as bad back when it was written - partitioning blows the problem up by an order of magnitude or three. . The costing really needs to at least multiply the number of to-be-compiled expressions with some cost to decide whether the cost of JITing is worth it, rather than making "flat" decision. > I did propose a patch to address this in [1]. It does need more work > and I do plan to come back to it for v16. FWIW, that doesn't seem quite right - won't it stop JITing e.g. on the inner side of a nested loop, just because it's cheap, even though that's where the bulk of the benefits comes from? Greetings, Andres Freund