Explain Analyze - actual time in loops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux