The physical ordering of your rows is essential for great performance  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏  ͏
SQL For Devs
Make Analytics Fast

Make Analytics Fast Course

Reordering

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.

Database optimizes it by using pages

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.

Ordered rows by column value

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!

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 .