Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dq9nM-0005RF-1o for pgsql-performance@arkaria.postgresql.org; Fri, 08 Sep 2017 03:17:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dq9nK-0000RX-Ez for pgsql-performance@arkaria.postgresql.org; Fri, 08 Sep 2017 03:17:26 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dq9nI-0000Py-Ul for pgsql-performance@postgresql.org; Fri, 08 Sep 2017 03:17:25 +0000 Received: from mail-yw0-x235.google.com ([2607:f8b0:4002:c05::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dq9nB-0002FR-PR for pgsql-performance@postgresql.org; Fri, 08 Sep 2017 03:17:23 +0000 Received: by mail-yw0-x235.google.com with SMTP id s62so4277995ywg.0 for ; Thu, 07 Sep 2017 20:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ZRzEk79BnTprbEFflLiuwoHZqogoR5laQp2fDUZ1LGg=; b=OXkleIw5et/ufDX4fTJg40t6LyTX4aLPx5bHeOhWHhcKS59rGawymUYqV7wI1fuODl I+ssJYwLxqtRBtGR62hQ+OJ8S605wMU9heTB0abPA3wv/qzv+F2z4olsBzOYppfl0ZjH qHdXbONQ/S0Q5v2JBVh/vmY2/UauMAU3Y3bhUpQxGpACqw3gFbty4Xx7lFR9JQcd56dW yJi0Lj0ZYGbMgG4PPlr51ydPNzXfFWxDlgqJLqXH75N1rlavAwT/dg1xX4XEtDkkWcOl y8BXXZh2AdeuykIdoAxi5r8taAi4CsJYMoc1txwS9teLPMDP6LPZzn8+egA6dnhr1UBw 9tKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZRzEk79BnTprbEFflLiuwoHZqogoR5laQp2fDUZ1LGg=; b=ZrZXMy2Gporj3j8nswd9yGTfndOVXBCAB+5sPJLqXKqbuas0j+wdP4/k8vLxTbL8fD +oSoJ5mudgSlWZlaWYa2uyPWmqMWoBrm3t3enJKi1s6JldpPnNvpYW90VWY50y513oEq JgCFBpncmw078i28nFfvaxriZoSbiSH59Hxg8EmyOl+cE7SkcKM9gKKdpxM+i8/fDm/P gjq6K0uIex5BW3u+hs08sYwaFEXgBRI++hW6J99AhPUvcWjCk3cwCIYAzfR/Lek/gkKr STM6LB+q9M3WJPfUFFW0h1Y6tcG815UHa6yVoRDPD2ZJp8MAfqi2HRxZgdXW5F4AyaX0 X0uQ== X-Gm-Message-State: AHPjjUiEZ2nm4eY+KuwIP3X9XStD5SuSJJmQcolV82t3oVA/nYMcd88v 8Prp2Xp1Y2i5a8fFRh6NdXBh8JkPyA== X-Google-Smtp-Source: ADKCNb5VtkpBM3FrRb3n2zqno3TdCPcAI7rpOJMLni+MhLkBlCyxT9tDmexg/r8bMD9FcHoe8wlkp6Cy+b2grehWHvs= X-Received: by 10.129.172.25 with SMTP id k25mr1219415ywh.299.1504840636231; Thu, 07 Sep 2017 20:17:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.73.199 with HTTP; Thu, 7 Sep 2017 20:17:15 -0700 (PDT) From: Neto pr Date: Thu, 7 Sep 2017 20:17:15 -0700 Message-ID: Subject: Explain Analyze - actual time in loops To: pgsql-performance@postgresql.org Content-Type: multipart/alternative; boundary="94eb2c1badfc90f3a10558a5032c" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org --94eb2c1badfc90f3a10558a5032c Content-Type: text/plain; charset="UTF-8" Dear, I'm trying to interpret an Explain Analyze, but I did not understand this: -> According to the Postgresql documentation at: https://www.postgresql.org/ docs/9.6/static/using-explain.html " the loops value reports the total number of executions of the node, and the actual time and rows values shown are averages per-execution. .... Multiply by the loops value to get the total time actually spent in the node" But look at this case, in which the total query time was 66 minutes. (Explain Analyze complete and Query at this link: https://goo.gl/Kp45fu ) What interests me is this section: ################################ ################################### -> Index Scan using idx_l_partkeylineitem000x on lineitem (cost = 0.57..97.65 rows = 26 width = 36) (current time = 23.615..419.113 rows = 30 loops = 26469) Index Cond: (l_partkey = part.p_partkey) ################################################## ################# According to the documentation, one should multiply the Actual Time by the number of Loops. That is: 419113 ms -> 419113/1000/60 = 6.9 minutes * 26469 (loops) = 182.6 minutes. But how does this stretch take 182.6 minutes, if the entire query ran in 66 minutes? Of course I'm making a miscalculation, but if anyone can give me a hint as to how I would calculate this time. What I need to know is the time spent go through the idx_l_partkeylineitem000x index, remembering that I did an Explain Analyze which is theoretically the actual time spent and not an estimate as happens with the simple Explain . thank you and best regards [] 's Neto --94eb2c1badfc90f3a10558a5032c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear,
I'm trying to interpret an Explain Analyze, b= ut I did not understand this:

-> According to the Postgresql docu= mentation at: https://www.postgresql.org/docs/9.6/sta= tic/using-explain.html

" the loops value reports the t= otal number of executions of the node, and the actual time and rows values = shown are averages per-execution.
.... Multiply by the loops value to g= et the total time actually spent in the node"

But look at this = case, in which the total query time was 66 minutes.
(Explain Analyze com= plete and Query at this link: https://goo.gl/Kp45fu )

What interests me is this section= :

################################ ############################= #######
=C2=A0=C2=A0 -> Index Scan using idx_l_partkeylineitem00= 0x on lineitem (cost =3D 0.57..97.65 rows =3D 26 width =3D 36)
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (current time =3D 23.615..419.113 rows =3D 30 loops =3D = 26469)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Index Cond: (l_partkey =3D part.p_p= artkey)
################################################## ########= #########
According to the documentation, one should multiply the Actual= Time by the number of Loops.
That is: 419113 ms -> 419113/1000/60 = =3D 6.9 minutes * 26469 (loops) =3D 182.6 minutes.

But how does this= stretch take 182.6 minutes, if the entire query ran in 66 minutes?

= Of course I'm making a miscalculation, but if anyone can give me a hint= as to how I would calculate this time.
What I need to know is the time = spent go through the idx_l_partkeylineitem000x index, remembering that I di= d an Explain Analyze which is theoretically the actual time spent and not a= n estimate
as happens with the simple Explain .

thank you and be= st regards
[] 's Neto

--94eb2c1badfc90f3a10558a5032c--