A different way of saving rows for better analytic query performance...  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
SQL For Devs
Make Analytics Fast

Make Analytics Fast Course

Columnstore

Hey, it's almost Christmas and you're already on vacation leave - or will be soon. Here's my gift for you: the next chapter of the TimescaleDB course has been released. And this one is something worth spending some time on your last workdays this year - or the first next year.

MySQL, PostgreSQL, SQLite etc. are fantastic databases and you can build a lot with them. But they are designed for CRUD-like workloads that require finding rows quickly and modifying them. For analytics workloads, this is inefficient as an entire row (or more precisely a chunk of rows) must be loaded even if you're only interested in two columns. That's slow if your analytics table has many columns...

Inefficient loading with a rowstore

A columnstore (as used by TimescaleDB) optimizes that bottleneck by splitting a table into columns and storing each column separately. Now, only the needed columns are loaded. Additionally, TimescaleDB can now compress those columns, which often reduces a table's size by more than 90%. So the database must load much less data, and queries are therefore a lot faster.

Optimized columnstore loading

Usually, tuning a columnstore is quite complicated: You must batch inserts because single-row inserts are too slow and you should also order them for best performance. That's a lot of overhead you don't want to do. And you don't have to. With TimescaleDB, you can configure the columnstore to automatically:

  • group rows that queries for e.g. a specific tenant are much faster
  • automatically reorder rows that a subset of rows for your queries can be found faster
Tuning the columnstore for your workload

That's a rough overview of the course's chapter but it describes the main idea. Learn about columnstores, their performance benefits and how easy it is with TimescaleDB - and that you can still update rows which other databases don't allow! If that sounds interesting to you, please take a look at it and let me know what you think!

Using TimescaleDB: Indexes & Chunk Skipping

I hope you learn a lot
Tobias

This message was sent to aaa1@niepodam.pl.
If you don't want to receive these emails in the future, you can unsubscribe .