Hey, As promised, I am back four weeks later with a new chapter of my fast analytics course. The previous chapters introduced you to how to use TimescaleDB. And today, you can read about the first performance optimization you can get without any effort.
Databases are fantastic. You can throw any query at them, and they do their best to find the most efficient way to execute it. And they are remarkable at that job! However, they can't beat physics: They have to load rows from all over a table, which is slow.
Every query would be much faster if the rows it is interested in were one after another. You can achieve this with TimescaleDB's reordering, which physically sorts rows on disk by the columns you want. So, any time the database fetches a batch of rows, it doesn't fetch completely irrelevant rows, e.g., for another tenant.
That's a rough overview of the course's chapter but it describes the main idea. Learn about random vs. sequential I/O operations and how database pages affect your query's performance. If that sounds interesting to you, please take a look at it and let me know what you think!
I hope you learn a lot
Tobias