Search results for "sort_buffer_size"
Fun MySQL fact of the day:
Last Thursday, I provided incorrect information. As it usually happens, I was misled by the Internet, and in turn, I contributed to further misleading the Internet. I only realized it after couple hours with a debug build of MySQL and some breakpoints in some non-obvious places. Thankfully, the incorrect ... read moreFun MySQL fact of the day: the buffer pool
Since February, we've been intentionally working off a half-formed mental model about InnoDB. In just about all cases, we considered a model wherein InnoDB always reads from and writes to the on-disk index files to serve each query. And while considering a mental model like this can certainly simplify ... read moreFun MySQL fact of the day: good-enough sort
Over the last few days, we've discussed some of the traits offilesort
and we'd discussed two important variables: sort_buffer_size
and max_length_for_sort_data
. But there's 1 more important variable that you may even find yourself wanting to change on a query-by-query basis: max_sort_length
. ... read more
Fun 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: 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
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: really temporary files
Before finishing the last 2 Fun MySQL Facts Of The Day about sorting, we're going to take a quick detour on what I considered a really fun fact aboutfilesort
. Or, well, more specifically, about MySQL's handling of temporary files (of type IO_CACHE
). ... read more
Fun MySQL fact of the day: OR
not
We started discussing secondary indices yesterday, and we considered how we might create two separate indices on our user
table. We also started to build an understanding of when MySQL can and shouldn't use an index for a query, but we omitted one fun fact. ... read more