Data · Guide

Warehouses & Lakes

Columnar storage, Parquet, partitioning, and the lakehouse pattern the field has converged on.

— min read Data

Why Analytics Needs Different Storage

A database tuned for orders is tuned for the wrong thing when you want five years of them summed by region. The access pattern, not the volume, is what forces a separate system.

Transactional systems answer questions about one row: fetch this order, update that balance. Analytical systems answer questions about one column across millions of rows: sum revenue by month.

That difference is why the two diverged. A row store must read every column of every row to sum one of them. A column store reads only the column you asked for, which is often a hundredth of the bytes.

OLTP — the application databaseOLAP — the warehouse
QuestionOne row, right nowOne column, across everything
LayoutRow-orientedColumn-oriented
WritesConstant, smallBatched, large
Normalised?HeavilyDeliberately not
Optimised forLatencyThroughput

Parquet & Columnar Formats

Columnar files are the reason modern analytics is affordable. Storing a column together means its values are similar, and similar values compress extremely well.

FormatLayoutUse it for
CSVRow, untypedInterchange only — no schema, no compression
JSONRow, nestedAPIs and raw landing zones
ParquetColumnarThe default for analytics at rest
AvroRow, schema-carryingStreaming and message payloads
ORCColumnarSimilar to Parquet, common in Hive estates

Parquet also stores min/max statistics per chunk, so a query filtering on a date can skip entire files without opening them — predicate pushdown. Combined with partitioning the data by that same date, a query over one day of a five-year table touches a fraction of a percent of it.

The small files problem: thousands of tiny Parquet files are slower than a few large ones, because per-file overhead dominates. Compaction is routine maintenance on any lake, not an optimisation.

Lakehouse Architecture

Warehouses gave structure and transactions but were expensive and rigid. Data lakes gave cheap object storage and any format, and frequently became swamps with no schema, no transactions and no idea what was in them.

The lakehouse keeps files in cheap object storage and adds a metadata layer on top that provides schema, ACID transactions and time travel. Delta Lake, Apache Iceberg and Hudi are the three implementations you will meet.

WarehouseLakeLakehouse
Storage costHighLowLow
SchemaOn writeOn readEnforced, evolvable
TransactionsYesNoYes
Any file typeNoYesYes

Layers are conventionally named bronze, silver and gold: raw as it arrived, cleaned and conformed, then aggregated for consumption. The names vary; the discipline of never letting consumers read the raw layer does not.

Interview Questions

Why is columnar storage faster for analytics?

An analytical query reads a few columns across many rows. A column store reads only those columns, so it moves far fewer bytes, and values within a column are similar enough to compress heavily.

OLTP versus OLAP?

OLTP serves the application: many small reads and writes of individual rows, normalised, latency-sensitive. OLAP serves analysis: large scans over few columns, denormalised, throughput-sensitive.

What does a lakehouse add to a data lake?

A metadata layer giving schema enforcement, ACID transactions and time travel over files that still sit in cheap object storage. It is what stops a lake becoming a swamp.

What is the small files problem?

Thousands of tiny files make per-file overhead dominate scan time, so a query is slower than the same data in a few large files. Compaction jobs are routine maintenance.

Why is a warehouse deliberately denormalised?

Joins are expensive at scale and storage is cheap. Duplicating dimension attributes into wide tables trades disk for far fewer joins on every query.

Quick Quiz

1. Columnar storage is faster for analytics mainly because…
2. Which format is the default for analytics at rest?
3. A lakehouse adds which of these to a data lake?
4. Warehouses are deliberately denormalised to…
5. Thousands of tiny Parquet files cause…