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

推荐订阅源

D
Docker
B
Blog RSS Feed
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
The GitHub Blog
The GitHub Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
博客园_首页
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
T
The Blog of Author Tim Ferriss
The Cloudflare 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
Tools for collecting and monitoring key Snowflake metrics
Nicholas Thomson · 2025-01-07 · via Datadog | The Monitor blog

In Part 1 of this series, we looked at how Snowflake enables users to easily store, process, analyze, and share high volumes of structured and semi-structured data, as well as key metrics for monitoring compute costs, storage, and datasets.

In this post, we’ll walk through how to collect and analyze these metrics using Snowsight, Snowflake’s built-in web interface. Snowsight enhances Snowflake’s data collection and monitoring capabilities by providing tools that allow users to track and analyze key metrics. Snowsight includes pre-built dashboards for monitoring various aspects of account activity, such as credit usage, storage, and query performance. These observability tools can help you track resource usage and manage costs.

We’ll discuss how to use the built-in tooling available in Snowflake to:

  • Review and analyze virtual warehouse metrics

  • Monitor query activity and history

  • Get visibility into spend and create budgets

  • Monitor data loading

Analyze virtual warehouse metrics

To get monitoring data on your virtual warehouses, you can use views in the ACCOUNT_USAGE schema like QUERY_HISTORY and WAREHOUSE_LOAD_HISTORY, or you can easily visualize data using the Warehouse Monitoring view in Snowsight, which provides real-time and historical insights into the performance and usage of Snowflake’s virtual warehouses. The metrics surfaced in these views can help you optimize performance, manage costs, and ensure efficient use of resources.

Snowsight’s Warehouse Activity view provides visibility into virtual warehouse performance.

You can use the Snowsight Warehouse Activity view to identify bottlenecks in query performance. For example, you can filter by STATUS over a certain time period to surface queries that FAILED. To troubleshoot, you should identify the root cause of the FAILED queries by:

  • Checking the error message to see if, for instance, the query failed due to a permission issue (e.g., “Insufficient privileges”) or due to missing or malformed data (e.g., “NULL value not allowed”, “Numeric value out of range”, “Data type mismatch”)

  • Reviewing the SQL query that failed to see if a syntax error or logic issue caused the query to fail

  • Noting how long the query ran before failing—long-running queries could be a sign of resource contention (e.g., insufficient compute capacity)

  • Verifying which warehouse executed the query

Monitor query activity and history

You can monitor query activity and history by using the QUERY_HISTORY view in the ACCOUNT_USAGE schema, or via Snowsight, which offers a Query History view. This view provides a detailed, searchable history where you can filter queries by user, warehouse, database, or execution status. Additionally, Snowsight provides real-time data on executed queries, while account_usage.query_history can have latency of up to 45 minutes. So if you want to view the most recent data, you should look at Snowsight.

Visualizing your query history helps you identify long-running or resource-intensive queries. For example, you could filter by Warehouse to narrow down your investigation, then sort queries by CREDITS_USED to identify the most resource-intensive queries. Since Snowflake charges for compute based on credits, this metric directly correlates with costs. Then, you could optimize these high-credit-consuming queries by, for example, rewriting SQL, improving joins, or implementing clustering keys on frequently queried columns.

Snowsight provides visibility into individual queries.

Snowsight’s Grouped Queries feature aggregates and organizes queries by common attributes (such as query type, user, warehouse, database, or table) and surfaces the group’s query hash. This visibility helps identify patterns and trends, allowing you to optimize query performance and resource usage. For example, you can use Grouped Queries to spot inefficiencies in query design, such as queries scanning large amounts of unnecessary data.

First, group queries by BYTES_SCANNED to identify those processing large data volumes. Once you’ve isolated the most expensive query groups, you can optimize them to retrieve only the necessary columns and rows by, for example, using WHERE clauses to filter data early and minimize scans. You might also consider table clustering to pre-aggregate frequently queried data.

Snowsight provides visibility into grouped queries.

Snowsight’s Query Profile tool visually breaks down each query’s execution plan, showing resource utilization at each step. It helps identify bottlenecks and improve query performance. For example, you can use Query Profile to understand a query’s execution plan.

The Query Profile breaks down the execution plan into stages (e.g., SCAN, FILTER, JOIN, AGGREGATE) and shows how data flows through the query. You can examine the sequence of operations to identify unnecessary steps or inefficiencies, as well as expensive operations such as large table scans or joins with a high number of input or output rows. To optimize performance, you can simplify query logic where possible and ensure that filters are applied early to reduce the data volume passed to subsequent stages.

Snowsight’s query profile tool provides visibility into execution plan stages.

Get visibility into spend and create budgets

Snowsight allows you to get a high-level overview of your organization’s spend with the Cost Management dashboard by highlighting top warehouses by cost, and surfacing insights, such as large tables that are never queried, tables where data is written but not read, rarely used views, and more. For example, a SysAdmin could use this dashboard to right-size virtual warehouses to balance performance and cost by comparing credit usage against query execution times to identify oversized or underutilized warehouses. If they notice a large warehouse is running lightweight queries, they can resize it to medium to save costs without sacrificing performance.

Snowsight’s Cost Management dashboard provides high-level insight into your organization’s spend.

The Consumption dashboard shows you the overall cost of running Snowflake within a given time period. For example, a SysAdmin could use the Consumption dashboard to monitor credit consumption trends by warehouse, time period, or user to identify patterns and peaks in usage. If they notice a spike in credit consumption during specific hours, they could investigate workloads running during that time and reassign them to smaller warehouses or off-peak hours.

Snowsight’s Consumption dashboard shows you cost over discrete time periods.

The Budgets view within the cost management dashboard allows users to define budget thresholds for teams or workloads to prevent unexpected costs. You can use resource monitors to set limits on credit consumption for specific warehouses or roles and configure alerts or automatic suspension when budgets are exceeded. For example, if a marketing analytics warehouse is capped at 1,000 credits per month, a SysAdmin can use the Budgets view to track its usage. If the warehouse exceeds the limit, the SysAdmin can navigate to the Warehouses tab under Admin, select the warehouse, and suspend it.

Snowsight’s Budgets view help your team plan and set limits on spend.
Snowsight’s Budgets view help your team plan and set limits on spend.
Snowsight’s Budgets view help your team plan and set limits on spend.

Monitor data loading

It’s important to monitor data ingestion into Snowflake to ensure data pipelines are running smoothly and to identify and resolve issues in the loading process. You can monitor data loading either by querying the COPY_HISTORY view in the ACCOUNT_USAGE schema, or in Snowsight under Monitoring and Copy History. The Copy History view shows you the history of your data loading (for the past seven days by default), surfacing data such as file name, loaded timestamp, status, database, schema, table, pipe, size, rows, and location.

Monitoring data loading is critical for timely analytics and downstream processes. For example, say you’re a SysAdmin monitoring data loading from an IoT service. You notice multiple failed COPY INTO commands, which are causing the downstream analytics service to produce faulty results based on stale data. Upon further investigation into the COPY INTO commands, you find data schema mismatches and work with data engineers to fix the pipeline.

Snowsight’s enables you to monitor data loading in the Copy History view.

You can use Snowflake resource monitors to manage and control the usage of compute credits in Snowflake effectively. Resource monitors allow SysAdmins to track credit consumption, enforce usage limits, and trigger alerts or actions when specific thresholds are reached, helping to optimize resource utilization and prevent unexpected costs. For example, a SysAdmin could create a resource monitor with a threshold of 1,000 credits per month for a department’s analytics warehouse. If the warehouse exceeds this threshold, Snowflake will send a notification to the SysAdmin and suspend the warehouse.

Snowflake offers a number of native tools you can use to collect, visualize, and analyze compute, cost, and query metrics. However, teams often use Snowflake in concert with a host of other tools—this can make it challenging to get to the bottom of issues in Snowflake without visibility into the rest of a distributed system. In such cases, it can be helpful to monitor Snowflake data alongside other telemetry, such as backend and cloud infrastructure metrics, which can impact things like query latency, data availability, and more.

In Part 3 of this series, we’ll show you how Datadog gives you visibility into your Snowflake databases—alongside tracing and telemetry from your applications and data from the infrastructure that they run on—in one unified platform.