ClickHouse vs TimescaleDB: one hour of sensor data, two storage engines (and two benchmarks that disagree)

Timescale's own launch post says TimescaleDB is 1.9x faster than ClickHouse on one benchmark and 6.8x slower on another. Both are true. We follow one hour of sensor readings through a TimescaleDB hypertable (chunks, Postgres rows, then Hypercore batches of up to 1,000) and through ClickHouse's MergeTree (parts, column files, 8,192-row granules), then read both vendors' published benchmarks with who built them on the label.

One sentence from Timescale’s own blog sets up this whole comparison: “TimescaleDB is 1.9x faster than ClickHouse on RTABench, even though it’s 6.8x slower on ClickBench” (Tiger Data blog, 26 March 2025). Same two databases, opposite results, one paragraph.

Both numbers are honest. They measure different shapes of work, and the reason is visible if you follow a single hour of data into each engine. That’s what this post does. Then it reads the published benchmarks from both sides, with who ran each one, the hardware and the date next to every number. Nothing here was benchmarked by me; the numbers come from vendors’ docs and published result files, and the arithmetic on those files is labelled as such.

Earlier posts in this series cover pieces we’ll lean on: ClickHouse vs PostgreSQL, MergeTree parts and granules, codecs for time series and ClickHouse vs Databricks.

The hour we’ll follow

A thousand sensors each send one reading a second: time, device, temperature. That’s 3,600,000 rows an hour and about 31.5 billion a year. It’s an illustration, not a measurement; the defaults below are the documented ones.

One hour, 3.6 million sensor rows, stored two ways (not to scale)TimescaleDBhypertableone table to SQLchunk7 days by defaultrowstorePostgres heap rowscolumnstorebatches ≤ 1,000 rowsper sensor: 3,600 readings → ~4 batches; whole hour → ~4,000 stored rows (arrays + min/max time)1,000 · 1,000 · 1,000 · 600ClickHouseINSERTone batchpartsorted by keycolumn filesone per columngranules8,192 rows eachwhole hour: 3,600,000 ÷ 8,192 ≈ 440 granules ≈ 440 index entries; columnar from the first insert…
Illustrative workload; arithmetic on documented defaults (TimescaleDB chunk interval 7 days and columnstore batches of up to 1,000 rows, per Tiger Data's docs and Timescale's engineering blog; ClickHouse index_granularity 8,192). Not a measurement.

Two different kinds of thing

TimescaleDB ClickHouse
What it is A PostgreSQL extension: your database is still Postgres Its own column-oriented database server
Made by Timescale, renamed Tiger Data in June 2025 ClickHouse, Inc.
Current version 2.32.1 (19 Nov 2026) 26.11
Licence Apache 2.0 core; Hypercore, continuous aggregates and more under the Tiger Data License (editions) Apache 2.0
Fresh data Postgres heap rows Columnar parts from the first insert
Cooled data Hypercore columnstore, batches of up to 1,000 rows Same parts, merged into bigger ones
Skips data with Chunk exclusion by time, min/max per batch, Postgres indexes Sparse primary index, one entry per 8,192-row granule

The rename has a telling reason: “The majority of workloads on our Cloud product aren’t time-series.” The extension itself keeps the TimescaleDB name.

Path one: TimescaleDB

Hypertable → chunk. Our hour lands in a hypertable, which looks like one table to SQL but is partitioned by time into chunks. The default chunk covers 7 days for timestamp columns, and Tiger Data’s sizing advice is that the indexes of the chunks you’re writing into should fit in about 25% of memory (sizing chunks). Our hour is one thin slice of this week’s chunk. Since 2.20 you can create it in one statement (create table):

CREATE TABLE readings (
  time        timestamptz NOT NULL,
  device      text,
  temperature double precision
) WITH (tsdb.hypertable, tsdb.segmentby = 'device', tsdb.orderby = 'time DESC');

Chunk → rows. Inside that chunk, fresh data is plain Postgres: 8 kB pages, each row with a header of “23 bytes on most machines” plus a 4-byte item pointer (page layout). That’s why recent data is easy here: INSERT, UPDATE, unique constraints, foreign keys and transactions all work as they always have.

Rows → columns. With the CREATE TABLE syntax the columnstore is on by default, and its policy converts a chunk once it’s a chunk interval old, checking once a day. Hypercore groups the rows by the segmentby column, orders them by orderby, and packs them into batches of up to 1,000 rows. Each column of a batch becomes one compressed array, so a batch is stored as a single row, with the batch’s min and max time next to it (Mike Freedman, Timescale, Nov 2023). One sensor’s hour of 3,600 readings fits in about four batches; the whole hour is about 4,000 stored rows instead of 3.6 million.

Compression is per type (compression methods): integers and timestamps use the Adaptive Integer Compressor since 2.32.0 (delta, delta-of-delta, Simple-8b and run-length encoding before that), floats get XOR compression “built on top of Facebook’s Gorilla compression”, and other types get dictionary compression. Tiger Data’s docs claim “90–98% compression in the columnstore” (Hypercore). That’s the vendor’s number; the ClickBench table below shrank by 73%, on web-analytics data that isn’t shaped like sensor readings. The columnstore also accepts INSERT, UPDATE, DELETE and upserts directly.

Path two: ClickHouse

Insert → part. Every insert into a MergeTree table writes a part, already sorted by the table’s ORDER BY and split into one file per column. There’s no row phase. The cost is that many tiny inserts make many tiny parts, so ClickHouse merges in the background and wants big batches or async inserts.

Part → granules. Rows are read in granules of 8,192 rows, and the sparse primary index keeps one entry per granule (MergeTree). Our hour is 3,600,000 ÷ 8,192 ≈ 440 index entries, small enough to stay in memory.

CREATE TABLE readings (
  time        DateTime CODEC(DoubleDelta, ZSTD),
  device      LowCardinality(String),
  temperature Float32  CODEC(Gorilla, ZSTD)
) ENGINE = MergeTree ORDER BY (device, time);

The codecs are the ones the ClickHouse docs suggest for time series: DoubleDelta for timestamps with a constant step, Gorilla for slowly changing floats. Both come from the same 2015 Facebook Gorilla paper that TimescaleDB’s float compression is built on. (For decimal-like floats, ClickHouse 26.11’s ALP usually beats Gorilla; see the codecs post.)

Two questions, two shapes

The last ten minutes for sensor 42 (about 600 rows). TimescaleDB excludes every chunk but this week’s, which is probably still in rows, and uses an index. ClickHouse reads its in-memory index and opens a granule or two. Both are fast.

Average temperature per sensor, per hour, for a year (31.5 billion rows). This is a scan, and reading compressed columns on every core is exactly what ClickHouse was built for. TimescaleDB’s columnstore has vectorized execution too (the 2.27 release post, June 2026, reports “30% to 2x” improvements for affected workloads), but it’s still a Postgres executor working through batches.

The benchmarks, with who ran them

PostgreSQL (heap)ClickBenchPostgreSQL (heap): 106.49 GB106.49 GBTimescaleDB, rowstoreClickBenchTimescaleDB, rowstore: 72.02 GB72.02 GBTimescaleDB, columnstoreClickBenchTimescaleDB, columnstore: 19.31 GB19.31 GBClickHouseClickBenchClickHouse: 15.26 GB15.26 GBPostgreSQLRTABenchPostgreSQL: 41.67 GB41.67 GBTimescaleDBRTABenchTimescaleDB: 15.81 GB15.81 GBClickHouseRTABenchClickHouse: 6.90 GB6.90 GB
Published data_size values, AWS c6a.4xlarge, untuned. ClickBench (maintained by ClickHouse): ClickHouse and TimescaleDB result files dated 2026-05-10, TimescaleDB without columnstore 2025-12-13, PostgreSQL 2026-09-21. RTABench (maintained by Timescale/Tiger Data): results published on rtabench.com. Nothing was run for this post. Bars to scale.

ClickBench is maintained by ClickHouse: one wide table of 100 million web-analytics rows, 43 queries, mostly scans (repo). On an AWS c6a.4xlarge (16 vCPU), untuned, from the result files dated 10 May 2026 (my arithmetic on their published files):

ClickHouse TimescaleDB (columnstore)
Load time 283 s (4.7 min) 2,930 s (48.8 min, includes compressing)
Stored size 15.26 GB 19.31 GB (72.02 GB without the columnstore)
Typical query, hot (geometric mean of ratios) 1× about 9.3× slower
Queries won 40 of 43 3 of 43

The three TimescaleDB wins all have the same shape: ... ORDER BY EventTime LIMIT 10, newest rows first. That’s what a time-partitioned table is built for.

RTABench is maintained by Timescale/Tiger Data, and “uses the ClickBench framework for benchmarking, but it introduces a new dataset and query set”: five normalized tables (customers, products, orders, order items, order events), about 171 million events, joins and selective filters (repo). On the same c6a.4xlarge, from the results published on rtabench.com: TimescaleDB wins 15 of 31 main queries and is about 1.4× faster overall by geometric mean (the launch post said 1.9×). ClickHouse still loads the data 7.3× faster (117 s vs 859 s) and stores it in less than half the space (6.90 GB vs 15.81 GB).

TSBS, the classic time-series benchmark, also lives in Timescale’s GitHub organisation; its README says it “is based on a fork of work initially made public by InfluxDB” (repo).

So each benchmark measures the shape its builder is best at, and each crowns its builder. One more detail: Timescale’s old “What is ClickHouse, how does it compare to PostgreSQL and TimescaleDB” post now answers with an HTTP 308 redirect to rtabench.com (checked 30 Nov 2026).

Where each one wins

Pick TimescaleDB when your metrics live next to your application’s data: you want to join readings with customer and device tables, keep transactions and foreign keys, update or upsert late data, and keep rollups fresh with continuous aggregates, all in one Postgres you already run. The catch is the licence: Hypercore and continuous aggregates are in the Community edition under the Tiger Data License, free to use but not to resell as a service, so a hosted Postgres from someone other than Tiger Data can only offer the Apache edition without them.

Pick ClickHouse when the data is large and the questions are scans: billions of events, many concurrent dashboard users, bulk loads. Its transactions are still experimental: an insert into one partition is atomic when it’s a single block, and updates arrive as lightweight patch parts (our post on deletes and updates).

The two companies are also walking toward each other. Tiger Data now sells Postgres for much more than time series, and ClickHouse launched its own managed Postgres (private preview, with Ubicloud), which ships pg_clickhouse to query ClickHouse from inside Postgres and uses CDC to copy tables across. Plenty of teams already run both: Postgres for the app, ClickHouse for the firehose.

Sources