Ordering By
These days I had an interesting ORDER BY case at work, which is worth analyzing because it really helps us understanding how hard the life of a database is when talking about query planning. Let’s ...
These days I had an interesting ORDER BY case at work, which is worth analyzing because it really helps us understanding how hard the life of a database is when talking about query planning. Let’s ...
In all our previous posts, I skipped over an important detail: blocks. Now it’s time to talk about them. On disk, data isn’t stored or retrieved in terms of bytes—or even rows. Instead, everything...
In my previous post about Postgres random_page_cost, we experimented with an orders table containing 10,000,000 rows and a status column with 4 distinct values. When filtering by each status, the q...
In my previous post, where I explored how databases handle random vs sequential reads, I mentioned Postgres’s random_page_cost parameter. To illustrate the concept, I used the simplified cost estim...
One simple but game-changing insight I had about database query performance was realizing how fundamental the number of sequential and random reads is to the way databases choose query plans, becau...