Skip to content

Query Analysis

Top queries

PerfScope's primary analysis view surfaces the Top N worst-performing queries for the selected time range.

Queries can be ranked by metrics such as:

Metric What it helps identify
Execution Time Long-running queries
Credits / compute cost Expensive workloads
Bytes Scanned Queries processing unusually large amounts of data
Spillage Queries exceeding available memory and spilling to storage
Queuing Time Workloads waiting for warehouse resources

Select a ranking metric to reorder the results.

Drill-down analysis

Select a query to inspect available diagnostic context, including:

  • Warehouse
  • User
  • Role
  • Query tag
  • Start and execution timing
  • Scan characteristics
  • Spillage indicators
  • Query-performance metadata

The exact fields displayed can vary based on the metadata available from Snowflake.

Trend analysis

Use trend views to understand how workload behavior changes over time.

Trend analysis can help you:

  • Detect performance regressions
  • Compare different time periods
  • Identify recurring workload patterns
  • Spot increases in query cost
  • Identify warehouses experiencing growing resource pressure

Filters

Use filters to narrow the analysis.

Filter Description
Warehouse Focus on a specific warehouse
User View queries executed by a specific user
Role Filter by execution role
Query Tag Filter by application, pipeline, or workload tags
Time Range Adjust the analysis window
Query Type Filter SELECT, INSERT, MERGE, COPY, and other operations

A practical PerfScope workflow is:

  1. Select an analysis time range.
  2. Rank queries by execution time or compute cost.
  3. Inspect the top offenders.
  4. Filter by warehouse, user, role, or query tag.
  5. Check spillage and queuing indicators.
  6. Compare with a previous time period.
  7. Use the findings to prioritize query or warehouse optimization.