pgbadger icon indicating copy to clipboard operation
pgbadger copied to clipboard

Avg duration 0ms

Open rus-ik opened this issue 3 years ago • 3 comments

In Most Frequent Queries, if Min duration is eq to 0, then number in Avg is zero too (and it seems it's not correct): image

rus-ik avatar Jul 27 '21 00:07 rus-ik

@rus-ik Since The avg duration is expressed as an rounded number of milliseconds. Let's take the last row, I think the average should be the following: (15000 + 696) / 300281 = 0.0522 which is rounded to zero. The same applies to the other rows.

wsdookadr avatar Jul 29 '21 08:07 wsdookadr

It sounds correct, thanks.. but I'd rather suggest to use a percentile (or a quantile) in this case, since the avg (when it's rounded to zero) becomes useless and shows nothing....

jfyi https://www.dynatrace.com/news/blog/why-averages-suck-and-percentiles-are-great/

rus-ik avatar Aug 02 '21 04:08 rus-ik

I agree that having percentile reported would be useful, but may increase the time to generate reports. Must be evaluated.

darold avatar Aug 05 '21 06:08 darold