Let’s Get Certified
Module 16 / 20 · Performance optimization, querying, and transformation

Distinguish persisted results from warehouse cache

Predict cache behavior after data changes, warehouse suspension or a repeat query.

Distinguish persisted results from warehouse cache

Work through the decision

The same report is fast on its second run. After suspending the warehouse, an identical query still returns quickly. Does that prove local compute cache survived?

Check your reasoning

A qualifying query may reuse a persisted result under the applicable conditions. Local warehouse data cache holds data for active compute and is lost on suspension. Metadata can also support certain operations without reading all table data. Examine query history and profile, then control result reuse in a test.

Watch the source lesson at 2:45:01

Compare the choices

Persisted query result
Reuse an eligible previous result when the query, data, privileges and other relevant conditions allow it.
Warehouse-local cache
Reuse data read by active warehouse compute. Suspending the warehouse removes its local data cache.
Metadata
Partition statistics and other platform metadata can help pruning and certain metadata-only operations.
USE_CACHED_RESULT
Control persisted-result reuse for a session when designing a comparison. It does not disable warehouse-local data caching.
Query Profile
Inspect actual execution evidence such as bytes scanned and the share read from local cache.

Test the decision

Run a representative scan with persisted-result reuse disabled. Keep the warehouse active for a repeat and observe the percentage read from cache. Suspend and resume, rerun with the same setting, and document the difference. Compare identical data and load levels.

Practice the guide skills

  1. List conditions for persisted result reuse and change one condition in a controlled trial. Watch 2:45:01
  2. Compare a warm warehouse scan with a scan after suspension while controlling result reuse. Watch 2:47:11
  3. Identify which observations could come from persisted results, local data or metadata. Watch 2:48:46

Official objectives for this lesson

Related lesson · Optimize the measured bottleneck

Knowledge check

Distinguish persisted results from warehouse cache quiz

Answer 3 questions. Check each answer for an explanation.