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 1nSBwh-0004PA-VC for pgsql-performance@arkaria.postgresql.org; Thu, 10 Mar 2022 06:06:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nSBvh-0003JG-UJ for pgsql-performance@arkaria.postgresql.org; Thu, 10 Mar 2022 06:05:41 +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 1nSBvh-0003J7-It for pgsql-performance@lists.postgresql.org; Thu, 10 Mar 2022 06:05:41 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nSBva-0006wW-Fn for pgsql-performance@lists.postgresql.org; Thu, 10 Mar 2022 06:05:41 +0000 Received: by mail-pj1-x1036.google.com with SMTP id v4so4344702pjh.2 for ; Wed, 09 Mar 2022 22:05:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=/+WvbWQ8cAUmkOemUvYsFzIzxspKvtFkw6gXCuT4bkc=; b=lfwAogqBjJJQZTKZxSt+tBpL/UUfronmMEjx2YwRMv/rNQd/V8qT1uRfNlf37e6699 W95P1vz30fMrST3rHK4b7W+W7RrhbO794xUh8mtmoj9lDJRWr7XLtuyVZc35cOEGlfbF nTSnKTkxWjbJ2GzQ2BTMcdxpBM/tu7ZPZBqyV3b4XfzbDR0E8VbFQAUjcMbbW+Qq2Ths Ch0oZtvs7GodVM/8hpxmmmvvMy8ymPhGyp63h2BXDBHk2wURtrrCh+0plte6tKorIwIs T/ifSNwfdBUvzszq56RObGYYHFq+sRArc/ZYBPdtAwwHRn2b/aku+ETkNt6CLvIhIyvn Ytww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=/+WvbWQ8cAUmkOemUvYsFzIzxspKvtFkw6gXCuT4bkc=; b=wTSdFyeQgIlSFHfVBg+WaW0tCWgMSn827NpURwQI06qEJidNqKyIPy7lmG/FES8Nfe LqD4gf9HcfA0T8iaJL0Gp2V1BM93slerqwPZ75X4uMRa4lheyv52om1QnBZ0jEvb0TZZ WePU++AgvuWDPyhrD9sk5GZqeA7lPjZQBI8nxGssrYC+ATNbu9AnqYAzsJdLhkpVTNjY uOxufykbIWtRgtckbYpXFj+UIzITBq5dEPfTBf/EelnVucDbZeHgnYsDgflmT/+KCpeM cG08YLhwxq2yrlv5KNP596cOZCBjJ/LwsZjP3mO8autcnFWhsULTpeqMmDfPfPgBZpwH dRzw== X-Gm-Message-State: AOAM533pNBruE6VXk4HPWCwUlygFcIrxE1MR8AH5cpqyZeTCAnv6AvM6 5SjkMm3sQ/ZlRaIMorJGuY0= X-Google-Smtp-Source: ABdhPJyCoHLFpfgfcrKjwiuQ3SdpKSIM0yhVjfv3/kQnH0ope4lQ93Methred2szJ5YpAm3QKOvLCw== X-Received: by 2002:a17:903:1210:b0:151:fa59:95ef with SMTP id l16-20020a170903121000b00151fa5995efmr3289225plh.57.1646892332365; Wed, 09 Mar 2022 22:05:32 -0800 (PST) Received: from jrouhaud (2001-b011-1005-5f87-1de2-53ab-ceaf-3917.dynamic-ip6.hinet.net. [2001:b011:1005:5f87:1de2:53ab:ceaf:3917]) by smtp.gmail.com with ESMTPSA id y2-20020a056a00190200b004f6ef638551sm5326317pfi.98.2022.03.09.22.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 22:05:31 -0800 (PST) Date: Thu, 10 Mar 2022 14:05:28 +0800 From: Julien Rouhaud To: Jayadevan M Cc: pgsql-performance@lists.postgresql.org Subject: Re: Explain analyse with track_io_timing Message-ID: <20220310060528.qik2ptwjkhzvxgex@jrouhaud> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Thu, Mar 10, 2022 at 10:40:17AM +0530, Jayadevan M wrote: > > What is the unit of I/O Timings in explain (analyze, buffers) ? milliseconds > There is a plan with quite a few nodes. In each case, the value of I/O > Timings is much more than the time for the outer node. A few lines from the > plan - > > Hash Left Join (cost=14320945.22..7099974624.27 rows=194335062701 > width=5511) (actual time=107913.021..*108109*.313 rows=759 loops=1) > Buffers: shared hit=738871 read=1549646, temp read=92710 written=92973 > I/O Timings: read=*228324*.357 > -> Hash Left Join (cost=14049069.69..246411189.41 rows=18342148438 > width=5467) (actual time=96579.630..*96774*.534 rows=759 loops=1) > Buffers: shared hit=684314 read=1377851, temp read=92710 > written=92973 > I/O Timings: read=*217899*.233 > At the end, there is > Execution Time: 108117.006 ms > > So it takes about 108 seconds. But the I/O Timings are higher. Is it a parallel query? If yes the total time is only the time spent in the main process, and the IO time is sum of all IO time spent in main process and the parallel workers, which can obviously be a lot more than the total execution time.