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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
博客园_首页
博客园 - 【当耐特】
V
Visual Studio Blog
博客园 - 叶小钗
月光博客
月光博客
美团技术团队
J
Java Code Geeks
小众软件
小众软件
Y
Y Combinator Blog
博客园 - Franky
Martin Fowler
Martin Fowler
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
人人都是产品经理
人人都是产品经理
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
云风的 BLOG
云风的 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 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
Monitor ClickHouse query performance with Datadog Databas...
Sangeeta Shivaji Rao, Mike Peralta · 2026-04-02 · via Datadog | The Monitor blog

ClickHouse is widely used for large-scale analytics, but once it is running in production, it can be difficult to understand how query activity translates into resource usage. Engineers investigating performance issues often struggle to determine which queries consume the most memory, run most frequently, or cause spikes in load. In practice, engineers are left querying system.query_log, tailing server logs, and piecing together information after an incident. While this can show what queries are running at a given moment, it does not provide a consistent way to compare queries across a cluster. It also does not reveal the overall impact of a query or show what it actually costs once it is finished.

Datadog Database Monitoring for ClickHouse, available in Preview, provides a unified view of query performance across both ClickHouse Cloud and self-hosted deployments. It collects aggregated query metrics, captures completed query samples, and surfaces real-time query activity so that teams can identify inefficient queries, investigate incidents, and optimize workloads.

In this post, we’ll cover how Database Monitoring for ClickHouse helps you:

  • Find your most expensive queries

  • Reconstruct what happened during an incident

Find your most expensive queries

Understanding query performance at scale requires more than reviewing individual slow queries. Engineers need to compare patterns across the cluster, including how often queries run, how long they take, and how much data they process. Without this context, teams might focus on outliers and miss the queries that drive most resource usage, such as queries that run thousands of times per hour.

Database Monitoring collects aggregated metrics for each normalized query pattern in your ClickHouse environment. This helps engineers evaluate queries by overall impact, not just latency. For example, a moderately slow query that runs frequently can have a greater effect than a single long-running query.

These metrics include execution count within a collection window, total and average duration, memory usage, and I/O activity such as rows and bytes read or written. They also include result set size, which helps teams understand how much data queries return to clients. With this data, teams can identify which query patterns drive the highest cost and prioritize optimization work.

Database Monitoring for ClickHouse brings all this together in one place, as shown in the preceding screen capture. The ClickHouse instance page gives you two complementary views for identifying expensive queries. The stacked bar chart breaks down sessions over time by query pattern. You can scan for spikes in load and hover over individual bars to see which query patterns were active at that moment, making it easy to correlate load spikes with specific queries.

Below the chart, the Queries table ranks query patterns by their current impact. Together, these views let you move beyond “which query is slowest” to “which query costs the most overall,” whether that’s a high-frequency moderate query or a low-frequency heavy one. The Query Metrics view lets you rank queries by the metric that actually matters: the total impact on the system. This way, you can optimize the right queries first, not just the most frequent or the slowest ones.

Reconstruct what happened during an incident

When performance issues occur, aggregated metrics are not enough. Engineers also need to understand the resource profile of each query execution—specifically, how individual queries performed at a specific point in time. To construct this profile, teams might resort to querying system.query_log across each node in the cluster, filtering through large volumes of entries, and correlating timestamps. On busy clusters, retention settings may even remove the data needed to perform a full investigation.

Database Monitoring captures completed query samples for each execution and stores them independently of ClickHouse logs. Teams can view these samples across multiple instances and clusters in a single place, which makes it easier to investigate issues that span distributed environments.

Each query sample includes detailed execution context, including query text (with sensitive values hidden), execution duration, memory usage, and data read and written. It also includes result set size and metadata such as user, database, tables accessed, and query type. All this context gives teams a clear picture of how queries interact with the entire system.

A completed query sample showing execution duration, memory usage, and event attributes.

With this data, engineers can also reconstruct incidents after they occur. They can identify which queries caused spikes in memory usage, determine whether workload changes contributed to degraded performance, and trace issues to specific users or services. Because Datadog retains this data, teams are not limited by ClickHouse log retention settings.

Get started with ClickHouse Database Monitoring

Database Monitoring for ClickHouse gives engineers a full, unified view of query performance, helping teams reduce costs, improve performance, and respond more effectively to incidents. Teams can view aggregated query metrics, completed query samples, and active queries in real time across all ClickHouse deployments in one place, alongside the rest of their Datadog observability data.

Database Monitoring for ClickHouse is available in Preview for both ClickHouse Cloud and self-hosted deployments. For setup details, see the ClickHouse Database Monitoring documentation or request access on the Preview page.

If you’re new to Datadog, sign up for a 14-day free trial.