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.96) (envelope-from ) id 1vdhjD-003gd1-0T for pgsql-performance@arkaria.postgresql.org; Thu, 08 Jan 2026 04:34:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vdhjB-00HZDq-0n for pgsql-performance@arkaria.postgresql.org; Thu, 08 Jan 2026 04:34:30 +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.96) (envelope-from ) id 1vdhjA-00HZDi-2r for pgsql-performance@lists.postgresql.org; Thu, 08 Jan 2026 04:34:29 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vdhj8-005D33-3B for pgsql-performance@lists.postgresql.org; Thu, 08 Jan 2026 04:34:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 6084YOgL1895376; Wed, 7 Jan 2026 23:34:25 -0500 From: Tom Lane To: Mark Kirkwood cc: David Rowley , pgsql-performance@lists.postgresql.org Subject: Re: Unexpected planner choice in simple JOIN In-reply-to: References: <71afdb09-0583-4af2-a3b3-50da4f987b9b@gmail.com> Comments: In-reply-to Mark Kirkwood message dated "Thu, 08 Jan 2026 17:24:02 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1895374.1767846864.1@sss.pgh.pa.us> Date: Wed, 07 Jan 2026 23:34:24 -0500 Message-ID: <1895375.1767846864@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Mark Kirkwood writes: > Good suggestion. The results are...interesting: It's clear that the planner is underestimating the costs of using a parallel worker in your setup. Try increasing parallel_setup_cost and/or parallel_tuple_cost to bring things more in line with reality. regards, tom lane