ClickHouse
An open-source column-oriented database for real-time analytics, fast enough to serve dashboards over billions of rows.
- What it is
- Data warehouses,Real-time analytics databases
- 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
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
- Scans and aggregations over billions of rowsColumns are stored and compressed separately, and vectorised execution scans only the granules the sparse index can’t rule out, on every core.
- Sub-second queries on fresh eventsBuilt for constant ingest plus millisecond queries; it reads Kafka topics directly and materialized views pre-aggregate rows as they arrive.
- Data model
- Relational tables, each sorted by its
ORDER BYkey - Query language
- SQL (ClickHouse dialect)
- 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 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.
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.writeDataPoint() call to record events with unlimited cardinality, adaptive sampling to keep it cheap, and a SQL API to query them.
DatabendOpen 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.
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 ClickHouse uses
What uses ClickHouse
- C++is the implementation language ofClickHouse
- jOOQgenerates classes from and queriesClickHouse
- Evidencequeries live through a direct connectorClickHouse
- Omicronstores rack metrics inClickHouse
- Hasura DDNconnects through an open-source connector toClickHouse
- RisingWavesinks materialized views intoClickHouse
- Streamlingupserts Arrow batches intoClickHouse
- EMQXwrites MQTT data intoClickHouse
- Tigriscan hold backups and cold data forClickHouse
- Workers Analytics Engineruns on a Cloudflare system built onClickHouse
- Atlasplans and applies schema changes toClickHouse
- ChartDBdraws diagrams of schemas inClickHouse
- DbVisualizerbrowses and queriesClickHouse
- Apache Glutencan use as its native backend the engine ofClickHouse
- chDBpackages the engine ofClickHouse
- Ibiscompiles queries to SQL forClickHouse
- Fireboltforked its original runtime fromClickHouse
- Tinybirdruns a managed fork ofClickHouse
- LakeOpsroutes queries toClickHouse
- Bruinruns SQL assets onClickHouse
- Cubecompiles metric queries to SQL forClickHouse
- PRQLis an experimental query dialect ofClickHouse
- Apache Supersetdraws dashboards overClickHouse
- Apitallystores its metrics and logs inClickHouse
- Better Stackstores and queries telemetry inClickHouse
- ClickStackstores all telemetry inClickHouse
- Grafanauses a plugin to queryClickHouse
- Sentrysearches and aggregates events inClickHouse
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
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
- 2009
Alexey Milovidov starts ClickHouse as an experiment at Yandex
- 2012
Goes into production powering Yandex.Metrica
- 2016
Open-sourced under Apache 2.0
- 2021
ClickHouse, Inc. incorporated; $250 million Series B at a $2 billion valuation
- 2022
ClickHouse Cloud opens for early access
- 2025
Raises a $350 million Series C
- 2026
Raises a $400 million Series D and acquires Langfuse
Sources19 · facts checked 5 October 2026
- ClickHouse docs: What is ClickHouse?
- ClickHouse on GitHub (Apache 2.0)
- ClickHouse docs: MergeTree
- ClickHouse docs: A practical introduction to primary indexes (sparse index, granules)
- Schulze et al.: ClickHouse, Lightning Fast Analytics for Everyone (VLDB 2024) · archived copy, original
- ClickHouse docs: Compression in ClickHouse
- ClickHouse docs: Incremental materialized views
- ClickHouse docs: Bulk inserts
- ClickHouse docs: Asynchronous inserts
- ClickHouse docs: Updating and deleting data with mutations
- ClickHouse docs: Lightweight delete
- ClickHouse docs: ClickHouse Keeper
- ClickHouse docs: s3 table function
- ClickHouse docs: iceberg table function
- ClickHouse docs: deltaLake table function
- ClickHouse docs: Kafka table engine
- ClickHouse Cloud docs: Overview (compute separate from storage)
- ClickHouse Cloud docs: Architecture (AWS, GCP, Azure)
- ClickHouse docs: Drivers and interfaces (native TCP, HTTP, gRPC, Arrow Flight)