Query details
Overview
Data teams can not easily identify which individual query might be driving an increase in spend or performance issues. Snowflake only provides query information for queries executed within the last 14 days. In addition, data engineers often have thousands of queries which makes it more difficult to monitor performance at a high level.
The Query details experience provides a drill-down view of Snowflake query performance, cost, and usage patterns grouped by parameterized query hash.
Query identifiers
| Identifier | Description | Example use case | Example data |
|---|---|---|---|
| Query ID | A unique identifier for each query executed in Snowflake. | Used to track and retrieve details about a specific query execution. | 01a8c0a5-0000-0b5e-0000-2dd500044a26 |
| Query Hash | A hash value representing the canonicalized SQL text of a query. | Used to identify identical queries for performance analysis or deduplication. | 33f0131d923670141b503e60be1c257c |
| Parameterized query hash | A hash value representing the parameterized version of a query (ignores literals). | Used to group similar queries with different literal values for aggregated analysis. | 0bd1c4fd599703c01b76a72dd25c4bba |
The parameterized query hash drives the high-level view of query performance. The query ID is used to drill down into a specific query execution, giving a look at the query cost, execution time, and other details.
Query details
The Query details page is accessible at /queries/:parameterizedQueryHash and has two tabs:
- Overview: Aggregated metrics, KPIs, time series visualizations, and a performance summary for the selected date range.
- All Executions: A table listing individual query executions under the parameterized query hash.
Both tabs support a configurable date range. The Overview tab additionally supports a granularity picker (day, week, month) for time series visualizations.
Access query details
Any role/user with permissions to view Warehouse Recommendations will be able to navigate to the Query details page from the following UI locations:
| Location | Description |
|---|---|
| Warehouse Schedule | The Projected impact on queries tab links each parameterized query hash to its Query details page. |
| Homepage | The Costliest queries widget lists the top-5 costliest parameterized query hashes and links each hash to its Query details page. |
| Warehouse Details | The Before / After Comparison Period on the Warehouse Details > Change History page links each parameterized query hash to its Query details page. |
| Optimization Hub | The query optimizations page for Poor query pruning, Long running failed queries, Single row inserts, Queries with high cloud service cost link to Query details for the associated parameterized query hash. |