liveBook · Manning

Query results cache

As explained in Snowflake Data Engineering

A query results cache is temporary storage of completed query results that can be returned for a matching query without re-executing it.

A query results cache temporarily stores completed query results so Snowflake can return them for a repeated query without executing the query again. Snowflake usually retains these results for 24 hours, improving performance for repeated queries. section 9.3

Distinguish the query results cache from Snowflake’s other caching layers:

  • The cloud services layer contains the query results cache and metadata cache. section 9.3
  • The metadata cache stores database-object metadata and can support fast queries without accessing table data or using a virtual warehouse. section 9.3
  • Each virtual warehouse has a warehouse cache in the query processing layer; its size depends on warehouse size. section 9.3
Figure 9.7 The three layers of the Snowflake architecture are database storage, query processing, and cloud services. The cloud services layer holds the metadata and the query results cache. The query processing layer holds the warehouse cache for each virtual warehouse.
figure

Use the architecture figure to locate the query results cache alongside the metadata cache and warehouse caches. section 9.3

How Snowflake Data Engineering covers it

How deep it goes
Defines temporary result reuse, retention, and architectural placement, but stops short of detailed matching rules.
Examples
Uses repeated execution of the same query and an architecture figure showing cache placement.
What you can do after
Evaluate repeated-query performance by distinguishing result reuse from metadata and warehouse caching.
How it connects
Connects query results cache with data caching, metadata cache, warehouse cache, cloud services, query processing, and virtual warehouses.

This explainer was generated by Manning's knowledge graph from the text of Snowflake Data Engineering. The section links point to the parts of the book it draws on.