iberezh
← All writing
· Databases

DuckDB vs ClickHouse on the same 100M rows

DuckDB or ClickHouse? I ran both on the same 100M rows to see where each one wins.

Same Parquet file, same SQL, both limited to the same 8 CPU cores. The answers matched to the cent.

DuckDB won 3: - loaded 100M rows in 5.6 s vs 17.1 s - revenue by country in 39 ms vs 185 ms - top 10 products in 98 ms vs 157 ms

ClickHouse won 3: - exact unique users per month in 1.8 s vs 2.7 s - the same query straight on the Parquet file: 2.0 s vs 7.2 s - 8 separate apps writing at once: 30,000 rows/s. With DuckDB the second process got "Could not set lock on file"

So it isn't a race, they're built for different jobs. DuckDB runs inside your process: a script, a notebook or your app, with no server to manage. ClickHouse is a server that many services can write to and query at the same time.

Which one do you use, and for what?

Discussion on LinkedIn

Next: 3 awaits vs Promise.all →