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 1jz6Eg-0008WQ-Jq for pgsql-general@arkaria.postgresql.org; Fri, 24 Jul 2020 22:32:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jz6Ef-0006cO-Bp for pgsql-general@arkaria.postgresql.org; Fri, 24 Jul 2020 22:32:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jz6Ef-0006cH-3y for pgsql-general@lists.postgresql.org; Fri, 24 Jul 2020 22:32:13 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jz6Eb-0004yi-CA for pgsql-general@lists.postgresql.org; Fri, 24 Jul 2020 22:32:12 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id C35DBA0C55; Fri, 24 Jul 2020 22:32:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo05-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo05-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d_qExNnt_GGd; Fri, 24 Jul 2020 22:32:05 +0000 (UTC) Received: from shr-macbook-pro.local (unknown [4.28.96.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id A8704A0BA1; Fri, 24 Jul 2020 22:32:02 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: bad JIT decision From: Scott Ribe In-Reply-To: Date: Fri, 24 Jul 2020 16:32:01 -0600 Cc: PostgreSQL General Content-Transfer-Encoding: quoted-printable Message-Id: <559519F3-5285-4F2B-A88F-0067382761A7@elevated-dev.com> References: <7736C40E-6DB5-4E7A-8FE3-4B2AB8E22793@elevated-dev.com> To: David Rowley X-Mailer: Apple Mail (2.3608.80.23.2.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jul 24, 2020, at 4:26 PM, David Rowley = wrote: >=20 > It does not really take into account the cost of jitting. That is what I was missing. I read about JIT when 12 was pre-release; in re-reading after my post I = see that it does not attempt to estimate JIT cost. And in thinking about = it, I realize that would be next to impossible to anticipate how = expensive LLVM optimizstion was going to be. In the case where a set of functions is replicated across partitions, it = would be possible to do them once, then project the cost of the copies. = Perhaps for PG 14 as better support for the combination of JIT = optimization and highly-partitioned data ;-)