swecrets

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.

Start course
Progress0/34 lessons

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.

  1. Foundations

    0 of 5 lessons

    You 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.

  2. Mechanics

    0 of 8 lessons

    You 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.

  3. Application

    0 of 4 lessons

    You 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.

  4. Judgment

    0 of 11 lessons

    You 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.

  5. Internals & Failure

    0 of 6 lessons

    You 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. Establish why analytical and transactional databases diverged, and place ClickHouse in that landscape before touching a line of syntax.

  2. 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. Build a correct mental model of how MergeTree actually stores and finds data, from first principles.

  4. Apply MergeTree fundamentals to real schema-design decisions for events, metrics, and log workloads.

  5. Learn the specialized MergeTree variants and build a decision framework for choosing among them.

  6. Build trade-off vocabulary against ClickHouse's real competitors, and practice architecture-level decision-making.

  7. 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.