34 lessons · ~11 hrs
ClickHouse — from Query to Storage Engine
Master the columnar OLAP database that powers analytics at Cloudflare, Uber, and Yandex — from first SELECT to reading the storage engine source.
Prerequisites
- Comfortable writing SELECT queries with WHERE, GROUP BY, and JOIN
- Can run and interact with a Docker container from the command line
- Understands what a database index is for, even without knowing how ClickHouse's differs
What you’ll be able to do
This course climbs all five rungs of the Mastery Ladder. Here’s the competence each rung builds toward.
Foundations
0 of 5 lessonsYou can explain the OLTP/OLAP divide, describe why columnar storage favors analytical queries, and place ClickHouse against warehouses, lakehouses, and real-time OLAP systems using the field's own vocabulary.
Mechanics
0 of 8 lessonsYou can load data via INSERT and file import, read system tables to see what a query actually did, and predict which queries a given ORDER BY will make fast or slow.
Application
0 of 4 lessonsYou can design an events or metrics table for a stated workload, choose an ingestion pattern (batch INSERT, Kafka engine, or materialized view), and defend a denormalization decision.
Judgment
0 of 11 lessonsYou can choose the correct MergeTree variant for a workload, decide between ClickHouse and Snowflake, BigQuery, DuckDB, Druid, or Pinot for a given use case, and defend a sharding vs. scale-up decision — each with named trade-offs, not just a preference.
Internals & Failure
0 of 6 lessonsYou can read system.query_log and system.parts to diagnose a slow query, trace a query from SQL text to execution pipeline, and navigate ClickHouse's own source to confirm a hypothesis about its behavior.
Curriculum
- 1. The Analytics Database ProblemFoundations
Establish why analytical and transactional databases diverged, and place ClickHouse in that landscape before touching a line of syntax.
- 2. Reading ClickHouseMechanics
Build the mental model of how ClickHouse presents itself — what it exposes to the operator, how data gets in, and what happens when a query runs. Read-along only; no setup required.
- 3. MergeTree from First PrinciplesMechanics
Build a correct mental model of how MergeTree actually stores and finds data, from first principles.
- 4. Designing Real SchemasApplication
Apply MergeTree fundamentals to real schema-design decisions for events, metrics, and log workloads.
- 5. The MergeTree FamilyJudgment
Learn the specialized MergeTree variants and build a decision framework for choosing among them.
- 6. Judgment and Trade-offsJudgment
Build trade-off vocabulary against ClickHouse's real competitors, and practice architecture-level decision-making.
- 7. Internals and DebuggingInternals & Failure
Go under the hood — the on-disk format, the execution engine, the source code — so you can debug the unfamiliar.