# Automatically optimize database queries with Datadog Database Monitoring

DevFeed: [Automatically optimize database queries with Datadog Database Monitoring](<https://devfeed.tech/articles/automatically-optimize-database-queries-with-datadog-database-monitoring-2235.md>)

Original publisher: [Read original article](<https://www.datadoghq.com/blog/bits-database-optimization/>)

Author: Nenad Noveljić; Alex Weisberger; Eden Gorevoy; Jake Martin

Published: 2026-06-09T00:00:00Z

Content type: article

Language: en

Sources: [Datadog | The Monitor blog](<https://devfeed.tech/sources/datadog-the-monitor-blog.md>)

Topics: [database monitoring](<https://devfeed.tech/topics/database-monitoring.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Database](<https://devfeed.tech/topics/database.md>), [Pull Request](<https://devfeed.tech/topics/pull-request.md>), [bits ai](<https://devfeed.tech/topics/bits-ai.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>)

Tags: [bits-ai](<https://devfeed.tech/tags/bits-ai.md>), [code](<https://devfeed.tech/tags/code.md>), [database](<https://devfeed.tech/tags/database.md>), [database-monitoring](<https://devfeed.tech/tags/database-monitoring.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [devops](<https://devfeed.tech/tags/devops.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pull-request](<https://devfeed.tech/tags/pull-request.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>)

## AI overview

Datadog Database Monitoring's Bits Database Optimization automatically identifies slow-query candidates, validates rewrites against a simulated copy of the schema, and opens pull requests with simulation evidence for the code that generated the query.

## Source excerpt

Learn how you can automatically detect, validate, and fix slow queries with Datadog Database Monitoring, closing the loop from optimization to deployment.