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 1v2FjZ-001ke6-8w for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Sep 2025 21:12:05 +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 1v2FjV-005zZy-VN for pgsql-hackers@arkaria.postgresql.org; Fri, 26 Sep 2025 21:12:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1v2FjV-005zZq-MB for pgsql-hackers@lists.postgresql.org; Fri, 26 Sep 2025 21:12:02 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1v2FjU-0005jQ-07 for pgsql-hackers@postgresql.org; Fri, 26 Sep 2025 21:12:01 +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 58QLBu3j034605; Fri, 26 Sep 2025 17:11:56 -0400 From: Tom Lane To: maciek@sakrejda.org, Maciek Sakrejda cc: Robert Haas , Marcos Pegoraro , pgsql-hackers Subject: Re: V18 change on EXPLAIN ANALYZE In-reply-to: References: Comments: In-reply-to Maciek Sakrejda message dated "Fri, 26 Sep 2025 14:01:37 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <34603.1758921116.1@sss.pgh.pa.us> Date: Fri, 26 Sep 2025 17:11:56 -0400 Message-ID: <34604.1758921116@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Maciek Sakrejda writes: > The page you link says > In some query plans, it is possible for a subplan node to be > executed more than once. For example, the inner index scan will be > executed once per outer row in the above nested-loop plan. In such > cases, the loops value reports the total number of executions of the > node, and the actual time and rows values shown are averages > per-execution. This is done to make the numbers comparable with the > way that the cost estimates are shown. Multiply by the loops value to > get the total time actually spent in the node. In the above example, > we spent a total of 0.030 milliseconds executing the index scans on > tenk2. > in the second paragraph after the example in this section. Do you > think that's not sufficiently clear? It's not wrong, but it feels a little incomplete now. Maybe change the last two sentences to Multiply by the loops value to get the total time actually spent in the node and the total number of rows processed by the node across all executions. In the above example, we spent a total of 0.030 milliseconds executing the index scans on tenk2, and they handled a total of 10 rows. A bigger gap in perform.sgml is that it doesn't address parallel query cases at all AFAICS. I think that was one of the main drivers of this change, so it feels a little sad that it's not covered here. regards, tom lane