Ryan Booz Profile picture
Oct 21, 2021 16 tweets 7 min read Read on X
1/ There's a question that we’ve been hearing a lot lately: how does @ClickHouseDB compare to @TimescaleDB for time series data? 🤔📊

After spending *many* weeks learning about ClickHouse, we finally have an answer for you… 👇

Read the full story: tsdb.co/clickhouse-ben…
2/ ClickHouse is an open-source columnar #OLAP database that was initially built for web analytics in Yandex Metrica. ClickHouse is known for its high insert rates, fast analytical queries, and #SQL-like dialect.
3/ Knowing this, it’s no surprise that people have been asking us how does ClickHouse compares to #PostgreSQL and TimescaleDB for time-series data💡But at Timescale, we take our comparisons very seriously… So we took some time (ahem, 3 months of testing!) before answering 🤓
4/ Developers deserve more benchmarking and less “bechmarketing”. Working on this comparison, we’ve spent hundreds of hours testing, reading documentation, and working with ClickHouse contributors 🤝
5/ Before sharing our conclusions, we’ll say this crystal clear: ClickHouse is an impressive piece of technology 🙌 ClickHouse proved to be a blazing fast database, especially in inserts and complex grouping aggregations.
6/ But in database design, nothing comes for free. ClickHouse is a great database for certain workloads, but not the best choice for others... And as a developer, the most important thing is to choose *the right tool for your workload*.
7/ Specifically, the ClickHouse architecture gives it great performance for OLAP-type workloads - but it implies significant tradeoffs that can be crucial for many use cases 👎
8/ A few examples of these tradeoffs:

➡️ Asynchronous deletes and updates
➡️ Lack of backup consistency
➡️ Non-standard SQL
➡️ No transactions
➡️ No user-defined functions
➡️ No index management beyond primary and secondary indexes
➡️ No triggers

...and there's more.
9/ #PostgreSQL is a versatile, fully reliable database with a vast ecosystem of tools 💪 and TimescaleDB optimizes it for time series. 🔥

If you need a database to power applications with many users + frequent updates/deletes, @TimescaleDB is a better choice than @ClickHouseDB.
10/ Now that we’ve set up the basics, we’re in a better place to understand our benchmark results 🎉 (By the way, our benchmarking suite is public - we welcome you to reproduce everything discussed here!) tsdb.co/github-tsbs

Keep reading for a summary of our findings 👇
11/ 👀 @ClickHouseDB vs @TimescaleDB: insert performance 👀 (I) >>

Overall, we found that ClickHouse outperforms TimescaleDB on inserts with large batch sizes… Image
12/ @ClickHouseDB vs @TimescaleDB: insert performance 👀 (II) >>

...but when the batch size is smaller, the results are reversed. Not only does TimescaleDB maintain steady, faster insert speeds than ClickHouse, but ClickHouse disk usage is 2.7x higher than TimescaleDB. Image
13/ @ClickHouseDB vs @TimescaleDB: Query performance 👀 >>

To our surprise, TimescaleDB was faster for the majority of the queries we tested - all except for complex aggregates. 🤯 Image
14/ In a nutshell:

🏗️ @ClickHouseDB is like a bulldozer: very efficient and performant for a specific use-case. If you're doing lots of construction, get a bulldozer!

🚗 Instead, #PostgreSQL (& @TimescaleDB) is like a car: versatile, reliable, and useful for most situations.
15/ To better understand our findings, please read the entire article! 🙏 You will find not only a detailed description of our benchmarking, but also a deep dive into the ClickHouse architecture: tsdb.co/clickhouse-ben…
16/ If you want to try TimescaleDB, the easiest way is to sign up for a fully-managed Timescale Cloud instance (100% free for the first 30 days!) 👉 tsdb.co/ts-cloud-signup

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Ryan Booz

Ryan Booz Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(