nerdexam
Snowflake

COF-C02 · Question #675

What affects whether the query results cache can be used?

The correct answer is C. If the referenced data in the table has changed. Snowflake's query result cache automatically invalidates when the underlying table data changes. If any DML (INSERT, UPDATE, DELETE, MERGE) has modified the referenced table since the result was cached, the cache is considered stale and cannot be reused. The other options are…

Performance Concepts

Question

What affects whether the query results cache can be used?

Options

  • AIf the query contains a deterministic function
  • BIf the virtual warehouse has been suspended
  • CIf the referenced data in the table has changed
  • DIf multiple users are using the same virtual warehouse

How the community answered

(40 responses)
  • A
    5% (2)
  • B
    3% (1)
  • C
    90% (36)
  • D
    3% (1)

Explanation

Snowflake's query result cache automatically invalidates when the underlying table data changes. If any DML (INSERT, UPDATE, DELETE, MERGE) has modified the referenced table since the result was cached, the cache is considered stale and cannot be reused. The other options are distractors: the virtual warehouse being suspended is irrelevant because the result cache lives in the Cloud Services layer, not in the warehouse. Non-deterministic functions (like CURRENT_TIMESTAMP) prevent caching, but deterministic functions do not affect it. Multiple users sharing a warehouse has no bearing on cache eligibility.

Topics

#Query Caching#Result Cache#Performance Optimization#Data Freshness

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice