internalsGet Pro

Module 13 · Lesson 5 of 10Pro

Pre-aggregation and rollups

Level
Intermediate
Topic
OLAP and real-time analytics
Reading time
16 min

When you finish this page you can

  1. Estimate how many rows a rollup saves from the dimensions it keeps, not only from its time grain.
  2. Build a per-minute rollup in ClickHouse with an incremental materialized view into a SummingMergeTree or AggregatingMergeTree table.
  3. Explain why a rollup fed on insert double-counts replayed rows, and how to repair it.
  4. List the questions a rollup can no longer answer, and keep the raw rows that can.
  1. Materialized views and aggregate tables16 min
  2. Real-time OLAP: ClickHouse, Druid and Pinot17 min

One tile reads 36 million rows every refresh

is an online store in India. Its apps send about 200 million click events a day. During a festival sale, a Flink job counts product views and add-to-carts per product in 10-second windows. It writes one row per product per window into the table live_product_counts, which the live festival dashboard reads.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan