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 1jvOMo-0003Dp-H3 for pgsql-general@arkaria.postgresql.org; Tue, 14 Jul 2020 17:05:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jvOMn-0003EK-Fb for pgsql-general@arkaria.postgresql.org; Tue, 14 Jul 2020 17:05:17 +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 1jvOMn-0003ED-7e for pgsql-general@lists.postgresql.org; Tue, 14 Jul 2020 17:05:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jvOMl-0000jw-87 for pgsql-general@lists.postgresql.org; Tue, 14 Jul 2020 17:05:16 +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 06EH5EqC2875991; Tue, 14 Jul 2020 13:05:14 -0400 From: Tom Lane To: Marc Millas cc: "pgsql-general@lists.postgresql.org" Subject: Re: how to "explain" some ddl In-reply-to: References: Comments: In-reply-to Marc Millas message dated "Tue, 14 Jul 2020 18:36:05 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2875989.1594746314.1@sss.pgh.pa.us> Date: Tue, 14 Jul 2020 13:05:14 -0400 Message-ID: <2875990.1594746314@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Marc Millas writes: > We would like to understand where an alter table attach partition spend its > time. > to my understanding, explain doesnt do this. Nope :-(. As our DDL commands have gotten more complicated, there's been some discussion of adding that, but nothing's really been done yet. There is some progress-monitoring support for some DDL commands now, but that's not quite the same thing. > for a BI job we have a partitionned table with 1800+ partitions. TBH I'd recommend scaling that down by at least a factor of ten. We are not at a point where you can expect that all operations will be cheap even with thousands of partitions. We may never be at that point, although people continue to chip away at the bottlenecks. regards, tom lane