How do you read a Snowflake Query Profile to find spilling, exploding joins and full-table scans?

Quick Overview

Asks how to read a Snowflake Query Profile to find the cause of a slow query, including spilling to disk, joins that multiply rows, and scans that read every micro-partition. Tests practical warehouse tuning and knowing which operator statistics to check.

How do you read a Snowflake Query Profile to find spilling, exploding joins and full-table scans?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

Explain how to interpret the Query Profile in Snowflake to identify performance bottlenecks such as spilling to local/remote storage, exploding joins, or full-table scans. ```hint Start from the time Find where the run time goes before reading any details. Then, for each red flag, ask which operator it would appear on and which pair of numbers on that operator gives it away. ``` ### What a Strong Answer Covers - How to find the operator that dominates the run time. - How spilling shows up, the difference between local and remote spilling, and how to reduce it. - How to spot a join whose output is far larger than its inputs, and the usual causes. - How to tell whether a table scan pruned micro-partitions, and how to improve pruning. - Other time categories or statistics that point to queuing or cold-cache problems. ### Follow-up Questions - Sizing up the warehouse removed the spilling, but the query now costs more. What else could you change? - A filter on a date column still scans 95% of the partitions. What would you check? - How would you find the worst-spilling queries across the account over the last week without opening each profile? - How do you tell an intended many-to-many join from an accidental one?

Overview: Asks how to read a Snowflake Query Profile to find the cause of a slow query, including spilling to disk, joins that multiply rows, and scans that read every micro-partition. Tests practical warehouse tuning and knowing which operator statistics to check.

General logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

Explain how to interpret the Query Profile in Snowflake to identify performance bottlenecks such as spilling to local/remote storage, exploding joins, or full-table scans.

What a Strong Answer Covers Guidance

  • How to find the operator that dominates the run time.
  • How spilling shows up, the difference between local and remote spilling, and how to reduce it.
  • How to spot a join whose output is far larger than its inputs, and the usual causes.
  • How to tell whether a table scan pruned micro-partitions, and how to improve pruning.
  • Other time categories or statistics that point to queuing or cold-cache problems.

Follow-up Questions Guidance

  • Sizing up the warehouse removed the spilling, but the query now costs more. What else could you change?
  • A filter on a date column still scans 95% of the partitions. What would you check?
  • How would you find the worst-spilling queries across the account over the last week without opening each profile?
  • How do you tell an intended many-to-many join from an accidental one?