Micro-partitions, columnar storage and compression
Snowflake automatically divides standard-table data into small storage units called micro-partitions. Values are stored by column and compressed, helping queries avoid reading unnecessary data.
Understand the idea
Database storage is where data is retained so it is available for later queries. For standard Snowflake tables, Snowflake manages how the values are physically organized and stored.
| Concept | What it means |
|---|---|
| Micro-partitions | Typically 50–500 MB before compression. |
| Columnar storage | Reads can focus on referenced columns. |
| Automatic compression | Snowflake chooses compression for stored columns. |
| Pruning | Metadata helps exclude partitions that cannot match a predicate. |
A concrete example
If partition A covers Jan 1–10 and B covers Jan 11–20, a Jan 15 filter can exclude A. B still needs matching-row evaluation.
Remember: The documented size range is uncompressed. Our date boxes are conceptual examples.
Explain it step by step · full theory
First, understand the meaning
Database storage is where data is retained so it is available for later queries. For standard Snowflake tables, Snowflake manages how the values are physically organized and stored.
You work with logical names such as a database, schema and table. Logical means the organization visible to you. Physical means the underlying representation managed by the platform. These are two views of the same data, not competing definitions.
Picture it in everyday life
In a library catalogue, a book has a subject and a catalogue entry. Behind the scenes, staff decide where and how books are stored. In Snowflake, database and table names help you find data, while the platform manages its underlying storage arrangement.
Why do we need this?
A learner may see ANALYTICS.FINANCE.SALES and imagine three physical disks. They are instead logical containers and an object name. The table’s underlying storage is managed separately.
This separation allows you to query records without manually choosing a file or disk for every row. You still choose useful columns, types and business meaning.
Let us follow it step by step
Follow a small sales table from its visible form to storage and back.
- The table presents rows such as an order ID, date, region and amount.
- Snowflake organizes standard table data in compressed, column-oriented storage.
- The data is divided into managed units called micro-partitions.
- Metadata records useful information about the stored data.
- A query reads the columns and partitions needed for its work, skipping irrelevant data when possible.
Worked example: skipping an irrelevant date range
Imagine three storage units whose date ranges are shown below. A query asks only for February records. These simplified ranges illustrate pruning; real data can have overlapping ranges.
| Unit | Dates it may contain | Needed for February? |
|---|---|---|
| A | January only | Can be skipped |
| B | February only | Read relevant data |
| C | January through March | May need to be read |
Column-oriented does not mean one file per visible column
Column-oriented storage groups values by column so analytical work can read needed fields efficiently. A query asking for region and amount may avoid unrelated large text fields. Compression represents data more compactly.
A micro-partition is not the same thing as a schema or a warehouse. Suspending a warehouse stops compute, not the stored table. Retention and deletion are separate policies; persistence does not mean every historical version is kept forever.
Before you move on
Use logical names to locate tables; let Snowflake manage standard-table physical storage. Understand pruning as skipping irrelevant data, not as a guarantee that every filter reads almost nothing.
Three physical ideas working together
For standard Snowflake tables, micro-partitions organize stored data automatically. Their typical documented size range is 50–500 MB before compression. Columns are stored in columnar form within those units, and compression is applied automatically.
Our teaching boxes below represent ranges of dates, not literal tiny physical partitions. A four-row VALUES query is useful for SQL arithmetic but cannot establish a realistic micro-partition layout. Inspect actual partition behavior with appropriately sized data and query evidence in the later performance levels.
Predict which ranges can contribute
Suppose three conceptual partitions cover the non-overlapping date ranges below. A filter for 2025-01-15 can exclude the first and third ranges. It must still inspect relevant data in the middle range because a minimum/maximum range does not prove the date is present.
If the query needs only order_date and amount, column-oriented reads can avoid unrelated columns such as a long shipping note. Partition elimination and choosing referenced columns reduce different dimensions of scanning. Overlapping ranges can reduce the opportunity for partition elimination.
| Partition | Minimum date | Maximum date | Could contain Jan 15? |
|---|---|---|---|
| A | 2025-01-01 | 2025-01-10 | No |
| B | 2025-01-11 | 2025-01-20 | Yes |
| C | 2025-01-21 | 2025-01-31 | No |
Compression preserves values while reducing representation size
Repeated categories and similar values can be represented more compactly. Snowflake selects compression for stored columns automatically. The ratio depends on the data, so a CSV file of a given size does not predict the final stored size exactly.
The practical lesson is to distinguish input-file bytes, logical values and physically stored compressed data. Compression, storage retention and the query access pattern all affect the cost and work of processing a table.
Words used in this lesson
- Logical object
- A named structure you work with, such as a table.
- Column-oriented
- Organizing stored values by column.
- Micro-partition
- A managed unit of standard Snowflake table storage.
- Pruning
- Avoiding reads of partitions that cannot contribute.
See how it works
Choose a step to explore the idea at your own pace.
Open the interactive explanation
Micro-partitions, columnar storage and compression
Visible table
Users see columns and rows, not a disk assignment for each value.
Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.
Read the complete diagram explanation
- Visible table
Users see columns and rows, not a disk assignment for each value.
- Stored form
The platform organizes standard table data and metadata.
- Read selectively
For February, skip January-only data but inspect ranges that might include February.
Try the SQL or command
Read → predict → run in your learning environment → compare. You can also learn by reading without an account.
New to SQL? Where to run it and how to read it
A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.
- No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
- For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
- Read the entire example, including comments beginning with
--. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor. - Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
- SELECT / FROM
- Choose the values to return / identify their input.
- VALUES / COLUMN1
- VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
- AS / WITH
- AS gives a result a readable name. WITH names a temporary query step within one statement.
- NULL / ::
- NULL means missing or unknown. The :: notation converts a value to a named data type.
- Session
- One connection and its settings. Keep related transaction steps in the same session.
- Database.schema.table
- A full address for stored data. It is separate from the warehouse that processes queries.
Help with common practice errors
- No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
- Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
- Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
- Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.
Select only the columns you need
SELECT COLUMN1 AS ORDER_ID
FROM VALUES (101, 40), (102, 60) WHERE COLUMN1 = 101;What to expect and why
Returns ORDER_ID 101. This demonstrates projection and filtering, not physical partition pruning: VALUES has no persisted table micro-partitions. Use Query Profile on a real table to observe partition counts.
Check your understanding
Choose an answer, then check your reasoning. This is practice, not a scored test.
Try it yourself
Explain to a teammate why a database, a schema and a warehouse are not interchangeable.
Compare your reasoning
A database groups schemas; a schema groups objects such as tables. A warehouse provides execution resources. The same authorized table can be processed by different warehouses.
Official sources and curriculum
Module 02 · See module scope