Caches in Snowflake
Caching is a process of storing frequently accessed data for faster access and to reduce resource usage.
There are 3 types of Caches.
1. Result Cache | Query Result Cache
2. Metadata Cache
3. Local Disk Cache | Virtual Warehouse Cache
Result Cache:
Stores the result of the every query executed in the past 24 hours and provides the same data without any compute charges, provided if the underlined data hasn't changed and no syntactical changes.
Metadata Cache:
Stores the metadata information about the databases,views and the tables.
Like the number of rows present in a table. ( Count(*) )
Minimum and maximum value of the columns.
The count of distinct values in a column.
Local Disk Cache:
Result and metadata cache are implemented in cloud service layer, whereas local-disk cache in compute layer.
Comments
Post a Comment