# Do database anomaly detection rules evaluate based on all requests, or on a request by request basis?

**URL:** <https://community.dynatrace.com/t/do-database-anomaly-detection-rules-evaluate-based-on-all-requests-or-on-a-request-by-request-basis/20346>\
**Category:** Alerting\
**Tags:** databases, problems-classic\
**Created:** [April 15, 2019, 8:55pm UTC](https://community.dynatrace.com/t/do-database-anomaly-detection-rules-evaluate-based-on-all-requests-or-on-a-request-by-request-basis/20346 "2019-04-15T20:55:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam\_sjoerdsma](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/adam_sjoerdsma/32/15312_2.png) [@adam\_sjoerdsma](https://community.dynatrace.com/u/adam_sjoerdsma)\
**Post date:** [April 15, 2019, 8:55pm UTC](https://community.dynatrace.com/t/do-database-anomaly-detection-rules-evaluate-based-on-all-requests-or-on-a-request-by-request-basis/20346/1 "2019-04-15T20:55:20Z")

</div>

Hi team,

My customer filtered down to a particular DB SQL request, in one of our databases, and is wondering why a problem hasn’t been created by Dynatrace.

Over the past 7 days the Request is showing typically less than a **50 MS** response time. Today that request is showing a climbing response time upwards of **1.3 S. (I am filtered on the request)**. the request is being executed far more than the 10/min requirement, and has been occurring for a number of hours in the graph below.

 ![20299-sql-modification-response-time.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/b/ab47558d600bb4f62269db6583119fb57306a059.png)

The response time rule is set to use the auto-baseline, and to alert if the response time increases by **5 MS** or by **50%**

Does Dynatrace alert on request level response time problems, or only if the DB service as a whole has a response time problem?

The response time for the requests as a whole hasn’t yet reached a 5 MS increase.

Thanks,

Adam Sjoerdsma

---

<div class="post-metadata">

**Author:** ![JamesKitson](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/jameskitson/32/22460_2.png) [@JamesKitson](https://community.dynatrace.com/u/JamesKitson)\
**Post date:** [April 16, 2019, 3:27am UTC](https://community.dynatrace.com/t/do-database-anomaly-detection-rules-evaluate-based-on-all-requests-or-on-a-request-by-request-basis/20346/2 "2019-04-16T03:27:51Z")

</div>

Be sure to post this on slack if you don’t get anything, there’s a lot more eyes on it there.

Line here says it should be creating a reference value for the different sql statements queried so I’d think it should be for all the queries with enough traffic: [Static thresholds for infrastructure monitoring — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/problem-evaluation#service-baselining)

Also, wouldn’t have an impact here but looking through the settings it looks like it would be 5 ms AND 50% not OR. No option I see for OR.

---

<div class="post-metadata">

**Author:** ![wolfgang\_beer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wolfgang_beer/32/14717_2.png) [@wolfgang\_beer](https://community.dynatrace.com/u/wolfgang_beer)\
**Post date:** [April 16, 2019, 6:24am UTC](https://community.dynatrace.com/t/do-database-anomaly-detection-rules-evaluate-based-on-all-requests-or-on-a-request-by-request-basis/20346/3 "2019-04-16T06:24:27Z")

</div>

Dynatrace auto baseline alerts on individual requests, on groups (QUERY, UPDATES, INSERTS) and on the entire service. Please check that the service did run and receive load for at least 20% of a weeks duration. Otherwise alerting is not active due to unstable baselines.

You can find more details about automatic baselines here:

> **[Static thresholds for infrastructure monitoring](https://docs.dynatrace.com/docs/dynatrace-intelligence/anomaly-detection/static-thresholds-infrastructure)**
>
> Learn about the fixed thresholds used by Dynatrace to determine when a detected slowdown or error-rate increase justifies the generation of a new problem event.

Best greetings,

Wolfgang
