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 1jz6Sk-0000aO-Uv for pgsql-general@arkaria.postgresql.org; Fri, 24 Jul 2020 22:46:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jz6Sj-0008AQ-SC for pgsql-general@arkaria.postgresql.org; Fri, 24 Jul 2020 22:46:45 +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 1jz6Sj-0008AJ-Jw for pgsql-general@lists.postgresql.org; Fri, 24 Jul 2020 22:46:45 +0000 Received: from mailout.easymail.ca ([64.68.200.34]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jz6Sh-0007Nd-4p for pgsql-general@lists.postgresql.org; Fri, 24 Jul 2020 22:46:45 +0000 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 680DF2124D; Fri, 24 Jul 2020 22:46:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo06-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo06-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iqQaIyFE8-Cw; Fri, 24 Jul 2020 22:46:41 +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 BC51120A68; Fri, 24 Jul 2020 22:46:36 +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: <629715.1595630222@sss.pgh.pa.us> Date: Fri, 24 Jul 2020 16:46:35 -0600 Cc: David Rowley , Andres Freund , PostgreSQL General Content-Transfer-Encoding: quoted-printable Message-Id: <9408F5F7-AD97-4E31-94BD-DAB5112E30F3@elevated-dev.com> References: <7736C40E-6DB5-4E7A-8FE3-4B2AB8E22793@elevated-dev.com> <629715.1595630222@sss.pgh.pa.us> To: Tom Lane 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:37 PM, Tom Lane wrote: >=20 > Yeah. I'm fairly convinced that the v12 defaults are far too low, > because we are constantly seeing complaints of this sort. They are certainly too low for our case; not sure if for folks who are = not partitioning if they're way too low. The passive-aggressive approach would really not be good general advice = for you, but I'm actually glad that in our case they were low enough to = get our attention early ;-) I think I will disable optimization, because with our partitioning = scheme we will commonly see blow ups of optimization time like this one. The inlining time in this case is still much more than the query, but it = is low enough to not be noticed by users, and I think that with = different variations of the parameters coming in to the query, that for = the slower versions (more partitions requiring actual scans), inlining = will help. Slowing down the fastest while speeding up the slower is a = trade off we can take.=