A 30-minute tour of the modern data stack, then one deep dive: how storage layout decides speed, cost and what is even possible.
Press S for speaker view · Esc for overview
Where data is born
Move it in
Keep it cheap and durable
Shape it
Make it fast to ask
Use it
Same data can live in all four, each answers a different question well.
Order-of-magnitude, storage-only list prices (us-east-1 style). Log scale: RAM costs hundreds of times more per byte than object storage.
"Just use Postgres" would have been wrong three times out of four.
Each coloured block below is one value. Highlighted = the bytes a query must read.
get order #5 (one whole row)SUM(amount) (one column, every row)Row store wins when you want a whole record · column store wins when you want a few columns of many records, and each column compresses far better (same type, repeated values).
| row group | column | min | max | bytes (zstd) |
|---|---|---|---|---|
| 0 | order_id | 1 | 122,880 | 162,139 |
| 0 | status | cancelled | shipped | 26,173 |
| 1 | order_id | 122,881 | 245,760 | 124,817 |
order_id ranges never overlap → the engine can skip whole row groups. status has the same min/max everywhere → useless for skipping.
We'll open this footer live in the demo.
WHERE order_id = 4,200,000Footer says only one row group's range contains it → 1 of 41 read. Measured locally ≈ 6 ms.
WHERE customer_id = 4242Every row group's range spans 1 – 200,000 → 41 of 41 read. Measured locally ≈ 12 ms.
Sort or cluster data by the column you filter on most. Locally the gap is only ~2× because fixed HTTP overhead dominates; on real S3 every skipped row group is a skipped network request, so the gap grows with latency and data size. (Same idea as clustering keys in Snowflake / BigQuery, Session 3.)
WHERE order_year=2025 AND order_month=6 → 1 file read.
No filter → 24 files read. The cheapest query is the one that never touches the data.
| Parquet | ORC | Avro | |
|---|---|---|---|
| Layout | columnar | columnar | row |
| Best for | analytics, lakes | Hive / Hadoop | streaming, Kafka |
Row store pays for indexes and per-row overhead · columnar stores compress by column · Redis pays RAM prices for every byte.
Bucket console: localhost:9001 (minioadmin / minioadmin) to show the folders.
●●● best fit · ●● workable · ● painful · ✕ wrong tool. Green = the winner for that need.
Student notes (Google Doc) have everything on these slides plus the demo queries.