惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
T
Threatpost
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - Franky
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
S
Security Affairs
P
Proofpoint News Feed
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
S
Security @ Cisco Blogs
H
Hacker News: Front Page
Security Archives - TechRepublic
Security Archives - TechRepublic
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
Know Your Adversary
Know Your Adversary
Y
Y Combinator Blog
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
月光博客
月光博客
量子位
博客园_首页
The Last Watchdog
The Last Watchdog
D
DataBreaches.Net
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
The Register - Security
The Register - Security
Schneier on Security
Schneier on Security
H
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
L
Lohrmann on Cybersecurity
S
Secure Thoughts
Stack Overflow Blog
Stack Overflow Blog
Cloudbric
Cloudbric
Microsoft Security Blog
Microsoft Security Blog

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Automatically optimize database queries with Datadog Database Monitoring
Nenad Noveljić, Alex Weisberger, Eden Gorevoy, Jake Martin · 2026-06-09 · via Datadog | The Monitor blog

Query optimization is a problem every team knows they should address but few have the time or expertise to do well. Identifying slow queries, reasoning about how to fix them, validating that a fix actually helps on your specific schema, and finding the right line of code to change all require deep database knowledge and careful testing. As a result, optimization usually becomes reactive to incidents, when the cost of inaction is already high.

Most database tooling stops at detection or, at best, a heuristic-based recommendation. Engineers are still left to interpret the suggestion, test it against their own environment, locate the code that produced the query, and decide whether the change is safe to ship.

Bits Database Optimization closes that loop by taking each candidate query through the full optimization life cycle. When Database Monitoring (DBM) detects a problematic query, it generates a candidate fix, runs both the original and the rewrite against a simulated copy of your schema, and only surfaces the optimization if the simulation proves it’s more efficient. From there, DBM hands the validated fix to Bits AI, which locates the code that built the query and opens a pull request with the diff. The PR includes the simulation evidence inline, so reviewers can ship the change without leaving their normal workflow. 

In this post, we’ll walk through how Bits Database Optimization:

  • Identifies optimizations and generates rewrites

  • Validates each fix against a simulated copy of your environment, with no write access to your database required

  • Opens a pull request on the line of code that produced the query

  • Helps you verify the improvement on real traffic after merge

Identify optimization candidates and generate rewrites and index recommendations

Bits Database Optimization scans your database fleet automatically and selects candidates based on signals already collected by DBM. It ranks queries by various criteria, including total execution time and the top queries for each service. For example, total execution time surfaces the queries with the largest cumulative wall-clock impact across your workload. These are the queries where a single rewrite delivers the most latency reduction in aggregate.

An optimized database query created and presented by Bits Database Optimization, showing suggested changes and related test results for those changes.
An optimized database query created and presented by Bits Database Optimization, showing suggested changes and related test results for those changes.

Because candidate selection runs against the telemetry DBM already collects, there’s nothing for you to configure, meaning no manual monitor setup, query lists, or tagging. Once a candidate is selected, Bits Database Optimization produces a concrete fix rather than a generic suggestion. Bits Database Optimization also surfaces missing index recommendations, but only when adding the index would actually change the plan for the query in question, not as generic suggestions to add covering indexes everywhere.

Validate every fix against a simulated copy of your environment

Other tools tell you that a rewrite is probably faster. With Bits Database Optimization, you can run both versions and see the evidence through a simulation of your own schema and data shape.

The Datadog Agent already collects table and index definitions as part of DBM’s schema collection. Bits Database Optimization replays those definitions into a fresh Postgres instance so the tables, indexes, and constraints mirror yours. It then populates the tables with synthetic data whose statistical properties match your production dataset (starting with cardinality and expanding to column-level distributions over time), so the query planner picks the same plans it would on real data. Queries run against synthetic test data covering frequent, rare, and normally distributed parameter values, designed to approximate real-world workloads. This means the simulation reflects the actual query shapes that matter instead of only the normalized form.

The simulation results from an optimized query suggestion by Bits Database Optimization.

Original and rewritten queries run head to head, and Bits Database Optimization collects elapsed time, logical reads, WAL bytes written, and full before/after EXPLAIN plans. A rewrite is only surfaced as an optimization if the simulation shows it’s faster on your specific schema and data shape.

This means Bits Database Optimization never needs write access to your database. All simulations happen in Datadog’s environment against the reconstructed schema, so there’s no risk to production data and no privileged credentials to manage. Also, no customer data leaves your environment. The simulation runs on synthetic data generated from statistical metadata; your actual rows are never copied or transmitted.

Specific simulation results from an optimized query based on specific metrics.

The simulation is also rewrite-agnostic, which means it can validate any rule-based or LLM-generated candidate query. This positions the simulation environment as a general trust layer for query optimization, not just a backend for the rewrites we ship today.

Open a pull request on the exact line of code

A validated fix is only useful if you can apply it. In practice, finding the line of code that builds a particular SQL query is one of the slowest parts of optimization work, especially in services where queries are constructed dynamically or sit behind an ORM.

Bits Database Optimization closes that last mile automatically. Using the APM span associated with the query, it resolves the owning service and the linked GitHub repository, then hands the rewrite to Bits AI, which locates the file and line that builds the SQL and opens a pull request with the minimal diff. The PR body embeds the simulation results (e.g., elapsed time delta, plan diff, affected tables) so that reviewers have the evidence inline and don’t need to click back into Datadog. From the normalized query view in DBM, a direct link takes you to the open PR.

Two prerequisites unlock automatic PRs: APM has to be configured for the service issuing the query, and the service needs a GitHub repository linked in Datadog. With those in place, the PR is created automatically as soon as the optimization is validated.

You can also configure a DBM monitor that fires when a new simulation optimization is available. The Slack notification includes a short description of the rewrite, the projected impact from the simulation, and deep links to both the optimization in DBM and the PR in GitHub, so the team can review and merge without leaving the channel they already work in.

Verify the improvement on real traffic

After the PR merges and the change deploys, the rewritten query shows up in DBM Query Metrics with its new performance profile. Teams can confirm that the gain measured in the simulation holds up under production load and watch the elapsed time drop on the same dashboard they used to spot the slow query in the first place.

An original query alongside an optimized query by Bits Database Optimization after implementation.

Continuous query optimization without the overhead

With Bits Database Optimization, slow queries are detected automatically, fixes are validated against your own schema before they ever reach you, and the diff lands in the same review queue as the rest of your code changes. You spend less time hunting for the right query to fix and more time shipping. The database is continuously tuned in the background.

To learn more, visit our documentation for Database Monitoring. If you’re new to Datadog, sign up for a free 14-day trial.