cloudparts

ClickHouse

An open-source column-oriented database for real-time analytics, fast enough to serve dashboards over billions of rows.

Type
Open source
Made by
ClickHouse, Inc.
License
Apache 2.0
Facts checked
5 October 2026

What it is

ClickHouse stores each column separately and keeps every table sorted by its ORDER BY key. Its main table engine, MergeTree, writes each insert as a new immutable part, and background merges combine parts into bigger ones. Instead of indexing every row, it keeps a sparse primary index with one entry per granule of 8,192 rows. That index is small enough to stay in memory, so a query that filters on the sort key reads only the granules that can match, and vectorised execution scans them on every core.

Unlike a lake query engine, ClickHouse owns its storage and is built for constant ingest plus queries that return in milliseconds, which is why it’s common behind user-facing analytics, observability and logs. It can also reach outside data: table functions read and write Parquet and other files on S3 and work with Iceberg and Delta Lake tables in place, and the Kafka table engine consumes topics continuously. ClickHouse is Apache 2.0 licensed; ClickHouse Cloud runs it on AWS, Google Cloud and Azure with storage and compute separated.

Why teams pick it

  • Very fast aggregations over billions of rows, with strong per-column compression
  • Handles high insert rates, and materialized views can pre-aggregate data as it arrives
  • Runs as a single binary on a laptop, as a self-hosted cluster or as ClickHouse Cloud
  • Queries S3, Parquet, Iceberg and Kafka directly

Watch out for

  • Many tiny inserts create many parts and merges fall behind; batch inserts or use async inserts
  • Updates and deletes run as mutations or lightweight deletes, not cheap row-level edits as in PostgreSQL
  • The sort key decides performance: queries that don’t filter on it read far more data
  • Self-hosted clusters mean running sharding, replication and ClickHouse Keeper yourself

Good for

Data model
Relational tables, each sorted by its ORDER BY key
Query language
SQL (ClickHouse dialect)
Client protocol
Its own native TCP protocol and HTTP; also gRPC and Arrow Flight
How it scales
Shards you set up yourself; ClickHouse Cloud separates compute from object storage
Replication
Replicated tables coordinated by ClickHouse Keeper (Raft)
Storage format
Columnar MergeTree parts, compressed per column and merged in the background
Written in
C++
Ways to run it
Single binary, self-hosted cluster, or ClickHouse Cloud on AWS, Google Cloud and Azure

Alternatives

What all data warehouses have in common →Compare side by side →
StarRocksOpen sourceAlso good for scans and aggregations over billions of rows and sub-second queries on fresh eventsAn open-source MPP analytical database with a vectorized engine that serves fast joins and real-time updates on its own tables, and also queries Iceberg, Hudi, Delta Lake and Hive tables in place.Apache DorisOpen sourceAlso good for scans and aggregations over billions of rows and sub-second queries on fresh eventsAn open-source MPP analytical database, born at Baidu as Palo, that serves sub-second queries on fresh, updatable data through the MySQL protocol and also queries Iceberg, Hudi, Paimon and Hive tables in place.Apache DruidOpen sourceAlso good for sub-second queries on fresh events and scans and aggregations over billions of rowsAn open-source real-time analytics database that makes Kafka and Kinesis events queryable within seconds and serves fast slice-and-dice queries to dashboards and APIs.Apache PinotOpen sourceAlso good for sub-second queries on fresh eventsA real-time distributed OLAP database from LinkedIn, built to answer analytics queries from end users in milliseconds at hundreds of thousands of queries per second, over data that arrived from Kafka seconds ago.kdb+CommercialAlso good for sub-second queries on fresh events and scans and aggregations over billions of rowsA columnar time-series database that is also an interpreter for q, an array language, used for market data across trading and risk.QuestDBOpen sourceAlso good for sub-second queries on fresh eventsA columnar time-series database in Java, C++ and Rust that ingests millions of rows a second and answers time-series SQL, with old partitions kept as Parquet.TimescaleDBOpen sourceAlso good for sub-second queries on fresh eventsA PostgreSQL extension that turns ordinary tables into time-partitioned, compressed time-series tables.Workers Analytics EngineCommercialCloudflare’s time-series analytics store for Workers: a non-blocking writeDataPoint() call to record events with unlimited cardinality, adaptive sampling to keep it cheap, and a SQL API to query them.chDBOpen sourceAlso good for scans and aggregations over billions of rowsThe ClickHouse engine packaged as a library: run ClickHouse SQL inside a Python, Go, Rust or Node.js program, with no server.DuckDBOpen sourceAlso good for scans and aggregations over billions of rowsAn in-process analytical SQL database: a library with no server that queries Parquet, CSV, Iceberg and S3 directly.+1 DuckFlightDatabendOpen sourceAlso good for scans and aggregations over billions of rowsA cloud data warehouse written in Rust that keeps every table as Parquet blocks and Git-like snapshots in object storage, so stateless compute clusters can start, scale and stop without moving data. Open core: Apache 2.0, with paid features under the Elastic License 2.0.Google BigQueryGoogle CloudAlso good for scans and aggregations over billions of rowsGoogle Cloud’s serverless data warehouse: no clusters, and you pay per TiB scanned or per slot-hour.SnowflakeCommercialAlso good for scans and aggregations over billions of rowsA fully managed cloud data warehouse that separates storage from compute, with virtual warehouses billed per second.Alibaba Cloud HologresCommercialAlso good for sub-second queries on fresh events and scans and aggregations over billions of rowsAlibaba Cloud’s PostgreSQL-compatible real-time data warehouse, which takes streaming writes, answers analytical queries and serves key lookups from one copy of the data.Azure Data ExplorerAzureMicrosoft’s managed analytics database for logs, telemetry and time series, known internally as Kusto and queried with KQL; it began as the back end of Azure Monitor’s Log Analytics and Application Insights.CrateDBOpen sourceAlso good for sub-second queries on fresh eventsA distributed SQL database built on Lucene: every column is indexed and stored column by column, so one cluster answers aggregations, full-text, geo and vector queries over fresh machine data.FireboltCommercialAlso good for sub-second queries on fresh events and scans and aggregations over billions of rowsA cloud data warehouse built for low-latency, high-concurrency queries behind apps and dashboards, also free to self-host as Firebolt Core.TinybirdCommercialAlso good for sub-second queries on fresh eventsA hosted ClickHouse platform that turns SQL queries into authenticated REST API endpoints, for analytics inside your product.MotherDuckCommercialAlso good for scans and aggregations over billions of rowsA serverless cloud data warehouse built on DuckDB, where one query can run partly on your laptop and partly in the cloud.

How it fits with other technologies

What uses ClickHouse

A MergeTree table, filled from Parquet on S3, then queried · sql

CREATE TABLE events (
    ts DateTime,
    user_id UInt64,
    event LowCardinality(String),
    duration_ms UInt32
) ENGINE = MergeTree
ORDER BY (event, ts);

INSERT INTO events
SELECT * FROM s3('https://acme-raw.s3.amazonaws.com/events/2026-10-*.parquet', 'Parquet');

SELECT event, count() AS n, quantile(0.95)(duration_ms) AS p95_ms
FROM events
WHERE ts >= now() - INTERVAL 1 DAY
GROUP BY event ORDER BY n DESC;

See it in a real stack

No architecture uses ClickHouse yet. Drop it into the playground and wire it up yourself.Open playground →

Benchmarks

How to read a benchmark →
Where it came from2009–2026

Yandex.Metrica, a web analytics service from the Russian search company Yandex, took in several hundred thousand events per second. It first stored them in MySQL’s MyISAM engine, but events from different websites arrived interleaved, so every report needed countless disk seeks; by 2011 the system held 580 billion rows and its disk arrays ran at 100% load. A purpose-built store called Metrage then pre-aggregated the data, which was reliable but only worked for fixed reports, because every way of grouping the data had to be listed ahead of time.

In 2009, Alexey Milovidov and his team started an experiment: generate reports in real time from raw, non-aggregated data that itself grows in real time. After three years it went into production in 2012, powering Metrica. The name combines “Clickstream” and “Data wareHouse”. Yandex open-sourced ClickHouse under Apache 2.0 in 2016. By 2017 Metrica’s ClickHouse database held 25.1 trillion rows, and its main cluster had grown to 426 servers.

Companies such as Uber, eBay and Cisco adopted it. In 2021 ClickHouse, Inc. was incorporated, headquartered in the San Francisco Bay Area, with an initial $50 million from Index Ventures and Benchmark, and it now runs ClickHouse Cloud.

Why it’s built this way

Store raw events, not pre-built aggregates
Pre-aggregation limited users to reports someone had planned. Querying non-aggregated data lets anyone slice it any way, and the team reasoned that the total computation might even go down.
Merge-based storage tuned for constant inserts
Metrica’s data arrived as a steady stream of small batches. Writing immutable sorted parts and merging them in the background, like an LSM tree, keeps inserts fast and reads sequential.
A sparse index instead of indexing every row
Keeping one index entry per granule of 8,192 rows makes the index small enough to stay in memory, while still letting queries skip most of the table when they filter on the sort key.
A native C++ binary, not a JVM program
Native code avoids garbage-collection pauses and can use SIMD instructions directly. Shipping one statically linked binary with no dependencies lets the same database run on an old laptop or a large cluster.

Timeline

  1. 2009

    Alexey Milovidov starts ClickHouse as an experiment at Yandex

  2. 2012

    Goes into production powering Yandex.Metrica

  3. 2016

    Open-sourced under Apache 2.0

  4. 2021

    ClickHouse, Inc. incorporated; $250 million Series B at a $2 billion valuation

  5. 2022

    ClickHouse Cloud opens for early access

  6. 2025

    Raises a $350 million Series C

  7. 2026

    Raises a $400 million Series D and acquires Langfuse

Sources19 · facts checked 5 October 2026

Improve this page on GitHub