Snowflake Storage Layer Key Concepts | Micropartition | Columnar Storage | Partition pruning
Understanding Snowflake's Storage Layer
Overview of Snowflake's Storage Technology
- Snowflake utilizes cloud-based object storage for its data, which includes database tables, staged files, and metadata. The choice of storage depends on the cloud platform selected during account setup (Amazon S3, Azure Blob Storage, or Google Cloud Storage).
- Benefits of using cloud storage include unlimited capacity and high durability due to redundancy; typically, three copies of data are maintained.
Data Loading Process in Snowflake
- Raw data files are commonly staged before being loaded into tables. The
PUTcommand transfers files from local machines to a stage in Snowflake.
- The
COPY INTOcommand ingests data from the staging area into a table while transforming it into a columnar format optimized for fast reading.
Micro Partitions Explained
- Data is partitioned into manageable chunks called micro partitions (50 to 500 MB uncompressed), which enhances performance and scalability.
- Unlike traditional systems where users define partitioning keys manually, Snowflake automatically creates micro partitions as data is loaded.
Advantages of Micro Partitioning
- Micro partitions allow efficient querying through partition pruning—eliminating unnecessary partitions based on metadata specific to each partition.
- Additional metadata stored with micro partitions includes value ranges and distinct counts for columns, enabling smarter query optimization.
Columnar Storage Format Benefits
- Snowflake employs a columnar storage format that significantly improves query performance by allowing selective access to columns needed for analytical workloads.
- During query execution, both partition pruning and column pruning occur; only relevant columns are processed based on the query conditions.
Immutability and Update Mechanism
- Micro partitions in Snowflake are immutable; once written, they cannot be modified. Updates create new micro partitions with updated values while retaining old ones until their retention period expires.
- This immutability supports advanced features like time travel and fail-safe mechanisms by maintaining start and end dates for each micro partition.
Turn any video into a summary like this
YouTube links, meetings, lectures. With transcripts, search, and chat.



