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 1svdfS-00GZpA-6T for pgsql-general@arkaria.postgresql.org; Tue, 01 Oct 2024 14:15:58 +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 1svdfR-00HY7x-Gk for pgsql-general@arkaria.postgresql.org; Tue, 01 Oct 2024 14:15:57 +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 1svdfR-00HY43-52 for pgsql-general@lists.postgresql.org; Tue, 01 Oct 2024 14:15:57 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1svdfJ-0021SL-1l for pgsql-general@lists.postgresql.org; Tue, 01 Oct 2024 14:15:56 +0000 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id 37B7C1141335; Tue, 1 Oct 2024 10:15:49 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Tue, 01 Oct 2024 10:15:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1727792149; x=1727878549; bh=0Y0qDOcL61TB3L/P3Yd6lTVta/P/C0ZpiZdzBH43On4=; b= LhvVlH3YU2XqoCrrWREYNtDBVn6DxlG27JC764rvotvhKcNbAu7iDIP7YxwFrsFZ fEkKP6SvIMKJdNRNAY4TcVCR1lTL6xsX4KSODVmNejF5v/qJzp2fyQmi5sC3Wq7c 3/CkJyZCZMzxxMh0sWMH8aeROO+QXRStnbLgkbyt00dJhq6/LA+COnSVqDZISdSi HtseVY2vtJ/F+tntHHC8tTEkjQwceyzz1C2/8xMU6MMIjWrDOHai/kFSRKo44dKs qBaR7UH5WQAxoGAWBvgzlbSs6cnlGvqILrNYFwnekhaB7DgQmO+h9AmGTRptNlMu HYexUuofgw6GdqsRiyQkHQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1727792149; x= 1727878549; bh=0Y0qDOcL61TB3L/P3Yd6lTVta/P/C0ZpiZdzBH43On4=; b=h 4MC2Md+V4mccI530w3jattkng0s6T4eSJpy6TB5xLbx+fvKkq+zWGdMpOYK+w3zy vSkh0Rod1AwX1nVjiiLt1UHx7hMqxEgQzI8G7OELJTV3G3RhabaLrkcAedgJkOxf Z8VxTNl1InaStG2oeO3K4rstNjmFmSw5Tz2lG2iFPt1WVC8QpftfLuMM1JFnt8SX FbWK5DCKtnzGcc/jPasDv56dj7kHwu+8E78PtODk7Pv8m3YMJGKnG6md1ZPSls/0 YooOz4llyUBi8LsAo6Jp7pCTLlYpFFV6Pk01U6bfzGWcW4mD5NO4pJ6e5OR0Fkd/ 6m0kenKZtX8x9HrxA3UBQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddujedgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthekredttddvjeen ucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrse grkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeekgeffgedvvddvhedvkeeh vdeiveeuffejieeiuedvteekveeiueeuleegffetjeenucffohhmrghinhepphhrohhfih hnihhtrdgvuhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmpdhnsggprhgtph htthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjrghnrdhpvggtshho khesphhrohhfihhnihhtrdgvuhdprhgtphhtthhopehpghhsqhhlqdhgvghnvghrrghlse hlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 1 Oct 2024 10:15:48 -0400 (EDT) Message-ID: Date: Tue, 1 Oct 2024 07:15:47 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Reading execution plan - first row time vs last row time To: =?UTF-8?B?UGVjc8O2ayBKw6Fu?= , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/1/24 06:53, Pecsök Ján wrote: > Dear community, > > We see significant difference in explain analyze Actual time in the > first line of execution plan and Execution time in the last line of > execution plan. What can be the reason? > > For example, first line of execution plan: > > Gather  (cost=1038.49..257627100.42 rows=7943222226 width=104) (actual > time=531.925..3673159.806 rows=7943221053 loops=1) > > This is 3673159/1000/60 = 61 minutes > > And last 2 lines of execution plan: > > Planning Time: 3000.399 ms > > Execution Time: 21208130.602 ms > > This is : 21208130/1000/60= 353 minutes > > What happened in 353 – 61 = 292 minutes? We speculate that disk writes. > Query possibly written cca 0,75TB of data, by create table as select query. You will need to show the complete EXPLAIN ANALYZE output as well as query. > > > S pozdravem > > *Ján Pecsők* > > Tychonova 2, 160 00 Praha > Mobil: +420 775 942 871 > jan.pecsok@profinit.eu > www.profinit.eu > > > -- Adrian Klaver adrian.klaver@aklaver.com