Janek Dolas
Janek Dolas

Reputation: 21

Snowflake warehouse cache

I cannot find such information anywhere in the documentation. I would like to figure out how the cache behaves when:

Upvotes: 0

Views: 886

Answers (2)

Mike Walton
Mike Walton

Reputation: 7339

To answer the questions asked directly:

  • No, each cluster in a multi-cluster warehouse maintains its own cache, but when there are more than 1 cluster in operation, the Snowflake services will attempt to execute the query on the cluster that contains the best cache for that query.
  • When scaling down, you lose nodes of the warehouse, and the cache for those nodes will also be lost.
  • If you suspend a warehouse, you lose the cache.

Upvotes: 4

Rajib Deb
Rajib Deb

Reputation: 1774

I think you are talking about the data cache(or SSD Cache or Local Disk cache). Think about it like this. A warehouse is a cluster of nodes. These nodes are nothing but the compute instances of the underlying cloud provider. For example if it is AWS, these nodes are EC2 instances. Each of these instances have SSD attached to it and the SSD caches some or whole of the table data when a query retrieves data from the remote storage(S3 in case of AWS). These cache is available till the warehouse is active. During that time any query which wants data from the same table can access the data from the SSD cache. But if the warehouse suspends, then next time when it resumes you may not get the same compute nodes attached, hence you may lose the data cache completely.

Upvotes: 0

Related Questions