# Health Rule creation for slow response DB statement

**URL:** <https://community.dynatrace.com/t/health-rule-creation-for-slow-response-db-statement/37731>\
**Category:** Open Q&A\
**Tags:** databases, problem-detection, dynatrace-managed\
**Created:** [December 16, 2022, 11:59am UTC](https://community.dynatrace.com/t/health-rule-creation-for-slow-response-db-statement/37731 "2022-12-16T11:59:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Selvam\_Sekar](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@Selvam\_Sekar](https://community.dynatrace.com/u/Selvam_Sekar)\
**Post date:** [December 16, 2022, 11:59am UTC](https://community.dynatrace.com/t/health-rule-creation-for-slow-response-db-statement/37731/1 "2022-12-16T11:59:40Z")

</div>

We have business requirement to create Anomaly detection or custom metric for monitoring the slow response of data base query/statement.

Please could you let me know how to create?

The end goal is, when the response time of particular DB statement is poor it requires alert and investigation.

---

<div class="post-metadata">

**Author:** ![pahofmann](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pahofmann/32/17076_2.png) [@pahofmann](https://community.dynatrace.com/u/pahofmann)\
**Post date:** [December 16, 2022, 12:26pm UTC](https://community.dynatrace.com/t/health-rule-creation-for-slow-response-db-statement/37731/2 "2022-12-16T12:26:09Z")

</div>

On the database service mark the specific statement as a&nbsp;[Key Request.](https://www.dynatrace.com/support/help/how-to-use-dynatrace/services/analysis/monitor-key-requests)

Then you can set [a static threshold for it in the service settings](https://www.dynatrace.com/support/help/shortlink/problem-detection-sensitivity-services#key-request).

---

<div class="post-metadata">

**Author:** ![Selvam\_Sekar](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@Selvam\_Sekar](https://community.dynatrace.com/u/Selvam_Sekar)\
**Post date:** [December 16, 2022, 12:58pm UTC](https://community.dynatrace.com/t/health-rule-creation-for-slow-response-db-statement/37731/3 "2022-12-16T12:58:51Z")

</div>

Thank you.

This works if we have any specific statement. But how we can configure if we don’t have any specific DB statement rather, we would require monitoring all the database statements that breaches static thershold value?

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [December 16, 2022, 2:21pm UTC](https://community.dynatrace.com/t/health-rule-creation-for-slow-response-db-statement/37731/4 "2022-12-16T14:21:30Z")

</div>

Hi&nbsp;[@Selvam\_Sekar](https://community.dynatrace.com/user/56732),

Please check this documnetation:

> **[Adjust the sensitivity of anomaly detection for database services](https://docs.dynatrace.com/docs/dynatrace-intelligence/anomaly-detection/adjust-sensitivity-anomaly-detection/adjust-sensitivity-services-database)**
>
> Learn how to adapt the sensitivity of problem detection for database services.

Best regards,

Mizső
