Latest Content
Fun MySQL fact of the day: batched key access
We took a small detour from discussing table joins yesterday to take a look at Disk-Sweep Multi-Range Read Optimisation (MRR). If you're wondering why, it's was so that we have a better understanding of how the third of the 3 join algorithms MySQL can use to join tables: the Batched ... read moreFun MySQL fact of the day: multi-range read optimisation
So far this week, we've looked at 2 of the 3 Nested-Loop Join algorithms MySQL can use to join tables. Before we look at the third one, we need to take a quick detour. ... read moreFun MySQL fact of the day: block nested-loop joins
Yesterday, we introduced MySQL's Nested-Loop Join algorithm, which it uses to join tables. In many cases, this is a fairly simple and powerful implementation, but as you may appreciate, sometimes this simplicity may end up being rather inefficient. ... read moreFun MySQL fact of the day: everything is a nested-loop join
Yesterday, we discussed that all queries in MySQL are joins, including single-table queries, but today, we'll start to focus on multi-table joins. ... read moreFun MySQL fact of the day: everything is a join
This week, we're going to start looking at table joins in MySQL, which, interestingly enough, is the only way MySQL executes queries. ... read moreFun MySQL fact of the day: paginating non-unique ranges
Yesterday, we started considering ways to paginate data without usingOFFSET
. We looked at a rather "simple" case where we were paging on a primary or unique key, but in some cases, that's not good enough. This is especially true in a system where the primary or unique ... read more
Fun MySQL fact of the day: paginated ranges
If the last few Fun MySQL Facts Of The Day weren't enough to convince you that your actions can have severe consequences in a hefty database of hundreds of millions or hundreds of billions of rows, I'm not sure what else can. But they absolutely can, and when the stakes ... read moreFun MySQL fact of the day: how many rows?
While trying to make sense the best I could of the code paths responsible for implementingSELECT ... LIMIT
, I stumbled across a relic of MySQL. I'll admit, it seemed so strange at the time that I wasted too much time trying to understand what and why it existed ... read more
Fun MySQL fact of the day: priority order
Yesterday and Friday, we took a quick peek into the sequence of events MySQL uses toLIMIT
and OFFSET
result sets. For the most part, it was relatively straight forward: MySQL either sends a row to the client or doesn't and it stops as soon as it sends n
... read more