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

推荐订阅源

V
Vulnerabilities – Threatpost
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
D
DataBreaches.Net
博客园_首页
罗磊的独立博客
B
Blog
T
Threat Research - Cisco Blogs
C
Cisco Blogs
GbyAI
GbyAI
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
G
GRAHAM CLULEY
H
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
SecWiki News
SecWiki News
T
Threatpost
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Schneier on Security
Schneier on Security
T
The Exploit Database - CXSecurity.com
Google Online Security Blog
Google Online Security Blog
T
Tor Project blog
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
H
Hacker News: Front Page
V
V2EX
Security Latest
Security Latest
Cloudbric
Cloudbric
Simon Willison's Weblog
Simon Willison's Weblog
Attack and Defense Labs
Attack and Defense Labs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
P
Proofpoint News Feed
博客园 - 三生石上(FineUI控件)
NISL@THU
NISL@THU
S
Secure Thoughts
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
V2EX - 技术
V2EX - 技术
Vercel News
Vercel News
P
Palo Alto Networks Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
Google DeepMind News
Google DeepMind News
Webroot Blog
Webroot 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 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 Securing customer logins with breach intelligence 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
Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring
2026-01-29 · via Datadog | The Monitor blog

In PostgreSQL, the EXPLAIN ANALYZE statement gives you a detailed report of what actually happens when you execute a query. This kind of information is important for troubleshooting slow queries, but using EXPLAIN ANALYZE to collect this data is often challenging in a production environment.

Datadog Database Monitoring now supports automatic collection of EXPLAIN ANALYZE plans for PostgreSQL, enabling you to easily capture execution details that help you troubleshoot slow queries.

Debugging query latency with EXPLAIN ANALYZE

Database Monitoring can now automatically process plans captured by PostgreSQL’s auto_explain extension for all queries that meet your criteria (for example, all queries that exceed 1 second).

Once this feature is enabled, Datadog processes the plan output and associates it with the underlying query and any related APM traces. With this correlation, you can detect performance issues in APM, identify the root cause as a query issue, and diagnose the specific problem all in the Datadog platform.

Additionally, Database Monitoring provides an interactive plan visualization that makes the EXPLAIN ANALYZE data easier to interpret, focusing on the nodes that account for most of the runtime. (Try it here.) This visualization is especially useful if you’re unfamiliar with explain plans or if you’re looking at an EXPLAIN ANALYZE plan for a large query.

Datadog PostgreSQL EXPLAIN ANALYZE plan map highlighting nodes and costs.

Identifying incorrect row estimates with EXPLAIN ANALYZE

As an illustration of how you can use EXPLAIN ANALYZE data in Database Monitoring to help you troubleshoot slow queries, consider the value of comparing estimated versus actual rows. Query latency often regresses when PostgreSQL underestimates how many rows a step will process. If actual rows are far higher than estimated, a plan that looks inexpensive can become highly resource-intensive in practice.

For example, let’s say you are troubleshooting the following query:

SELECT count(*)

FROM orders o

JOIN users u ON o.user_id = u.id

WHERE o.status = 'PENDING';

By reviewing EXPLAIN ANALYZE output in Database Monitoring, you might see that the estimated rows predicted from the preliminary EXPLAIN plan are far lower than the actual rows processed. That miscalculation could lead PostgreSQL to perform a nested loop join instead of a hash join, which can cause a major slowdown.

This kind of discrepancy would indicate that your table statistics are stale and that you need to run ANALYZE on that table to resolve the issue.

Nested loop join where actual rows far exceed estimates.

Identifying cache hit versus disk read issues with EXPLAIN ANALYZE

Another way EXPLAIN ANALYZE data can help you diagnose query latency in Database Monitoring is by surfacing data about where a query is performing reads. Examining disk reads versus cache hits helps you determine whether a slow query is waiting on storage reads or running primarily from cached data. If the plan shows a high number of disk reads, it would suggest you should focus on reducing I/O or improving caching capacity to reduce latency. On the other hand, if it shows mostly cache hits, you should focus on reducing work in the execution plan.

For example, let’s say the following query is performing poorly:

SELECT

e.event_id,

e.event_time,

u.email

FROM

large_event_log e

JOIN

users u ON e.user_id = u.id

WHERE

e.event_time > '2025-01-01'

ORDER BY

e.event_time DESC;

You review the EXPLAIN ANALYZE output for the query in Database Monitoring. In the output, you see that the I/O Read Time makes up the vast majority of your execution time and that your Shared Hit count (i.e., from cache) is low. This means your “working set” is larger than your RAM. In this case, it would be advisable to add more RAM to allow PostgreSQL to keep these blocks in the shared_buffers. This would likely drop this query’s time significantly.

Seq scan with high I/O read time and many shared read blocks.

Alternatively, let’s say you are investigating a slow query, and the Index Scan from EXPLAIN ANALYZE reveals a Shared Hit Blocks value of 3.00M. This means the CPU had to look into the RAM cache three million times. As reported in the Shared Read Blocks value, zero blocks had to be fetched from disk, indicating that your RAM is large enough to support the query’s needs. Upgrading your hardware would provide no benefit here, which suggests that optimizing your query is your best bet.

Index scan with 3M shared hit blocks and zero disk reads.

Troubleshoot slow queries more easily with EXPLAIN ANALYZE plans in Database Monitoring

Database Monitoring can now automatically collect PostgreSQL execution plans to help you find the root cause of your query issues. This data is correlated with APM traces, enabling you to move from detecting an application performance issue to resolving a root cause of query latency all in one platform.

To get started with EXPLAIN ANALYZE with Database Monitoring, check out our documentation here. And if you don’t already have a Datadog account, you can sign up for a 14-day free trial.