cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Database Aggregation metric not showing true sum

mdouds
Organizer

We're dealing with some extremely slow database queries that aren't showing accurate aggregation metrics in the Purepath. In one example, it will show 1 x DB query in the argument column and 0.03 for the Exec Total [ms] column.

If I turn off JDBC aggregation, it shows 70,000ms in the purepath tree Exec Total column.


This discrepancy is making it very difficult to troubleshoot issues and find the slow query. A similar post here https://answers.dynatrace.com/spaces/148/uem-open-q-a_2/questions/106485/database-dashlet-exec-avg-t... looks like the same issue at the bottom, where @Andreas G. said the database time metric should not change just by enabling aggregation.


With aggregation enabled, the Node Details show .03 in the Time Details Exec column, and the 70,000 under the Statement Aggregation Details Execute row. But the purepath tree only shows the .03.


So with aggregation disabled, if I see this:

ArgumentExec Total (ms)
SELECT * from product_prices100.00
SELECT * from product_prices300.00


I would expect the aggregation to show this:

ArgumentExec Total (ms)
2 x SELECT * from product_prices400.00


But instead it's picking some other java execution time and showing .02ms.


Edit:

Here's a better view of the query details: the purepath tree is displaying the Execution Time of .03ms, but the actual time is 130 seconds.


If I disable JDBC aggregation, then the purepath shows the full response time for the query.


8 REPLIES 8

As I understand there is no chance that you have couple of hundreds of DB statement execution? In such case aggregation would indeed be result of sum. I’m wondering if in other case actually problem is with slow query. Maybe problem is with connection acquisition and during aggregation it’s summed up somehow. How your connection pools looks like?

Sebastian



ChadTurner
Leader
@Andreas G. Andi might have some insight on this for you being that the original referenced Q&A was from 2015.
-Chad

mdouds
Organizer

Unfortunately not, we are looking at queries that are only executed once in the transaction. The purepath shows some miniscule number for the query, but drilling down to the database dashlet or right-clicking the query and viewing details shows a drastically different number.



Ok one more question, when you have aggregation disabled and query is presented as fast one, overall response time of this pure path is indeed 70s? If yes, did you tried using cpu sampling or show all nodes option to drill down about root cause then?

Sebastian


Ask as many questions as you like, we could use any help!

If we disable aggregation, the query is presented with the correct response time.

No matter the aggregation setting, the purepath overall always shows the correct response time.

We know the root cause is the slow database query based on Node Details and the Drill down into the database dashlet. Our problem is getting the actual query response time to show up in the purepath with aggregation enabled.

Based on the 2015 forum post I linked, they were having the same problem with the DB Time measure fluctuating based on the aggregation setting. I haven't kept aggregation disabled long enough to see if this is the case for us, but seems like the same issue.


mdouds
Organizer

Purepath view (130 second query selected at the bottom showing .03):


Drill down to database dashlet shows the correct 130s Exec Time (except for Min = 0.00?):



So what Incan suggest to you is rising support ticket. Attach there two purepaths, one with aggregation one without. Only one Idea except that I have is being sure that you have newest AppMon version. Second is checking if there is difference when you use classic or AppMon agents. The second one is build on top of OneAgent binaries used in dynatrace so it may work in different way than classic one.

Sebastian


We switched one of the agents to Classic, and that fixed the problem. I raised a ticket with support. Thanks!