All posts by Jørgen Løland

A new dimension to MySQL query optimizations – part 2

This is “A new dimension to MySQL query optimizations – part 2”. If you didn’t read part 1 already I suggest you skim through it before reading on.

To summarize, the problem at hand is this: Given a query with a join between two or more tables, the MySQL optimizer’s mission is to find the best combination of join order and access method so that the response time becomes as low as possible.…

A new dimension to MySQL query optimizations – part 1

It’s not radical to claim that one of the most important tasks of any DBMS query optimizer is to find the best join order for the tables participating in a query. Is it, e.g., better to read country or city first in

employee or department first in

If the optimizer gets this wrong, the resulting response time may be disastrous (or hilarious, depending on your sense of humour).…