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 1n9TSx-0006OG-7c for pgsql-admin@arkaria.postgresql.org; Mon, 17 Jan 2022 14:58:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n9TSw-0003RS-46 for pgsql-admin@arkaria.postgresql.org; Mon, 17 Jan 2022 14:58:38 +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 1n9TSv-0003RJ-Q7 for pgsql-admin@lists.postgresql.org; Mon, 17 Jan 2022 14:58:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n9TSt-00043K-Gw for pgsql-admin@lists.postgresql.org; Mon, 17 Jan 2022 14:58:37 +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 20HEwWFM3992396; Mon, 17 Jan 2022 09:58:32 -0500 From: Tom Lane To: Ron cc: pgsql-admin@lists.postgresql.org Subject: Re: Large number of partitions of a table In-reply-to: <671340a5-1960-e5dc-1d09-4b7f36cda2c8@gmail.com> References: <3919502.1642393668@sss.pgh.pa.us> <671340a5-1960-e5dc-1d09-4b7f36cda2c8@gmail.com> Comments: In-reply-to Ron message dated "Mon, 17 Jan 2022 08:41:34 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3992394.1642431512.1@sss.pgh.pa.us> Date: Mon, 17 Jan 2022 09:58:32 -0500 Message-ID: <3992395.1642431512@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron writes: > On 1/16/22 11:38 PM, Victor Sudakov wrote: >> so no query should ever have to use more than 1 partition. > I find it hard to believe that you'll *never* run a report against more > customers than are in a single partition. Yeah, I'm a little suspicious of that. The other thing I'd be worried about, given that the OP is using v13, is that UPDATE/DELETE planning performance can be pretty awful with lots of partitions. There were some O(N^2) behaviors in there that we didn't get rid of till v14. regards, tom lane