# Trying to explain to DBA's how the Dynatrace One Agent calculates time for DB calls

**URL:** <https://community.dynatrace.com/t/trying-to-explain-to-dbas-how-the-dynatrace-one-agent-calculates-time-for-db-calls/49735>\
**Category:** Open Q&A\
**Tags:** databases, oneagent\
**Created:** [January 15, 2025, 3:39pm UTC](https://community.dynatrace.com/t/trying-to-explain-to-dbas-how-the-dynatrace-one-agent-calculates-time-for-db-calls/49735 "2025-01-15T15:39:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![runatyr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/runatyr/32/11396_2.png) [@runatyr](https://community.dynatrace.com/u/runatyr)\
**Post date:** [January 15, 2025, 3:39pm UTC](https://community.dynatrace.com/t/trying-to-explain-to-dbas-how-the-dynatrace-one-agent-calculates-time-for-db-calls/49735/1 "2025-01-15T15:39:32Z")

</div>

Hello everyone.

I am trying to expand my understanding in the process so I wanted to pose this question to the community.

I have a group of DBA’s that are somewhat _“dismissive”_ of the information Dynatrace one agent provides when it

comes to the response times shown for applications making DB calls.

Look at the instance below.

In the example below, we see 5 DB calls. 4 being made relatively quickly.

The middle call however, can take up to 5 seconds to complete.

 ![Example_DB_Time.png](https://global.discourse-cdn.com/dynatrace/original/2X/a/aefa30736366c20820a2d2cdc13ade24fe516e28.png)

When shows this information, the standard response from the DBA’s I receive is. “That’s all time on the network”

Based on my limited understanding of the OneAgent, it &nbsp;_ **could** _ be network time as well as DB processing time. However I would raise the question in response : “Then why aren’t the other calls seeing similar slow times immediately before and after it. “

**So my question to the community is… how does the Dynatrace OneAgent actually determine the time that was spent on that call?**

**Does the 5 second instance below include both network travel time as well as DBA processing time?**

How does Dynatrace determine this value?

Thank you!

-C

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [January 15, 2025, 3:57pm UTC](https://community.dynatrace.com/t/trying-to-explain-to-dbas-how-the-dynatrace-one-agent-calculates-time-for-db-calls/49735/2 "2025-01-15T15:57:38Z")

</div>

To make it easy, Dynatrace treats Databases as external services.&nbsp;  
When your application starts the interaction with the database (select, update, etc) the trace has an initial time.  
When your application receives the results from the database, you have the final time.  
The network time is included because the oneagent only knows about starting and end time of the transaction.

---

<div class="post-metadata">

**Author:** ![kalle\_lahtinen](https://avatars.discourse-cdn.com/v4/letter/k/bb73d2/32.png) [@kalle\_lahtinen](https://community.dynatrace.com/u/kalle_lahtinen)\
**Post date:** [January 16, 2025, 12:17pm UTC](https://community.dynatrace.com/t/trying-to-explain-to-dbas-how-the-dynatrace-one-agent-calculates-time-for-db-calls/49735/3 "2025-01-16T12:17:42Z")

</div>

Paco already summed it up nicely. I think it should be common sense for most people that if one DB statement always takes 5 seconds to complete and the other ones just some milliseconds, I don’t see how anyone can argue that the “slow network” always happens to affect just that single call and not the others? Again, assuming that the above behavior is constant and not a one-off.

---

<div class="post-metadata">

**Author:** ![D\_Miller](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/d_miller/32/22229_2.png) [@D\_Miller](https://community.dynatrace.com/u/D_Miller)\
**Post date:** [January 16, 2025, 5:38pm UTC](https://community.dynatrace.com/t/trying-to-explain-to-dbas-how-the-dynatrace-one-agent-calculates-time-for-db-calls/49735/4 "2025-01-16T17:38:37Z")

</div>

To add further information to the “discussion” with the DBAs you could chart that SQL Request to show that it’s consistently taking a long time.

---

<div class="post-metadata">

**Author:** ![mdouds](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@mdouds](https://community.dynatrace.com/u/mdouds)\
**Post date:** [January 16, 2025, 9:50pm UTC](https://community.dynatrace.com/t/trying-to-explain-to-dbas-how-the-dynatrace-one-agent-calculates-time-for-db-calls/49735/5 "2025-01-16T21:50:31Z")

</div>

We’ve had these conversations internally as well. It’s not 100% accurate to say it’s _ALL_ spent in network time…this is total round trip time from your client application to/from the database so will also include the DB’s query execution time.

When comparing the response time in Dynatrace vs the actual execution time, it’s also important to account for how much data is being transferred across the network.&nbsp; If this one query returns a huge amount of data it could explain why they would think it’s all in the network.

---

<div class="post-metadata">

**Author:** ![runatyr](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/runatyr/32/11396_2.png) [@runatyr](https://community.dynatrace.com/u/runatyr)\
**Post date:** [January 17, 2025, 1:23pm UTC](https://community.dynatrace.com/t/trying-to-explain-to-dbas-how-the-dynatrace-one-agent-calculates-time-for-db-calls/49735/6 "2025-01-17T13:23:51Z")

</div>

I have to thank all of you for such complementing suggestions. Collectively, they make a really compelling argument

as to why the data is useful to the DBA’s.

Thank you again!
