What conditions would invalidate the result cache in Snowflake, preventing a query from being served instantly?

Quick Overview

A Snowflake question about the result cache: which conditions stop a repeated query from returning its stored result instantly. It tests knowledge of query text matching, data and table changes, run-time functions, role privileges, session settings and result retention.

What conditions would invalidate the result cache in Snowflake, preventing a query from being served instantly?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

What conditions would invalidate the result cache in Snowflake, preventing a query from being served instantly? ```hint Think like the cache To return a stored result safely, the system has to be sure the same query would give the same answer now. List everything that answer depends on. ``` ```hint Look beyond the rows Changed table data is the obvious case. Also consider the functions in the query, who is running it, the session settings, and how long results are kept. ``` ### What a Strong Answer Covers - Which changes to the query text make it count as a different query - Changes to the referenced tables, including physical changes that leave the rows the same - Functions and object types whose results cannot be reused - How roles, privileges and session settings affect reuse - How long results are kept, and how to turn reuse off or confirm that it happened ### Follow-up Questions - A dashboard query never hits the result cache. What would you check first? - How would you confirm that a particular query was served from the result cache? - Why does a query that misses the result cache often still run faster the second time on the same warehouse? - Can you use a persisted result as input to another query?

Overview: A Snowflake question about the result cache: which conditions stop a repeated query from returning its stored result instantly. It tests knowledge of query text matching, data and table changes, run-time functions, role privileges, session settings and result retention.

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

What conditions would invalidate the result cache in Snowflake, preventing a query from being served instantly?

What a Strong Answer Covers Guidance

  • Which changes to the query text make it count as a different query
  • Changes to the referenced tables, including physical changes that leave the rows the same
  • Functions and object types whose results cannot be reused
  • How roles, privileges and session settings affect reuse
  • How long results are kept, and how to turn reuse off or confirm that it happened

Follow-up Questions Guidance

  • A dashboard query never hits the result cache. What would you check first?
  • How would you confirm that a particular query was served from the result cache?
  • Why does a query that misses the result cache often still run faster the second time on the same warehouse?
  • Can you use a persisted result as input to another query?