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.94.2) (envelope-from ) id 1sRv1X-0021YP-B3 for pgsql-general@arkaria.postgresql.org; Thu, 11 Jul 2024 14:43:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sRv1W-00Eo9k-2v for pgsql-general@arkaria.postgresql.org; Thu, 11 Jul 2024 14:43:54 +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.94.2) (envelope-from ) id 1sRv1V-00Eo9c-OQ for pgsql-general@lists.postgresql.org; Thu, 11 Jul 2024 14:43:53 +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.94.2) (envelope-from ) id 1sRv1T-001Zcy-3F for pgsql-general@lists.postgresql.org; Thu, 11 Jul 2024 14:43:53 +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 46BEhgbW2077941; Thu, 11 Jul 2024 10:43:42 -0400 From: Tom Lane To: Dimitrios Apostolou cc: David Rowley , pgsql-general@lists.postgresql.org Subject: Re: Query on partitioned table needs memory n_partitions * work_mem In-reply-to: References: <3603c380-d094-136e-e333-610914fb3e80@gmx.net> Comments: In-reply-to Dimitrios Apostolou message dated "Thu, 11 Jul 2024 16:08:42 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2077939.1720709022.1@sss.pgh.pa.us> Date: Thu, 11 Jul 2024 10:43:42 -0400 Message-ID: <2077940.1720709022@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dimitrios Apostolou writes: > The TABLE test_runs_raw has 1000 partitions on RANGE(workitem_n). So don't do that. Adding partitions is not cost-free. regards, tom lane