Goal:
Getting rid of filesorts and temporary tables by tuning MySQL queries.
Background:
Filesorts and temp tables are a necessary evil in MySQL, used when MySQL must sort the data before returning the output to the user. They are the most common issue with slow queries in MySQL, the main reason being that if the output is too large, you can kiss goodbye in-memory performance, and say hello to disk access.
Common User and Manager symptoms:
- Sore throats due to excessive swearing at poor database performance.
- Sore hip pockets due to lack of scalability requiring continuous hardware purchases.
- Sore users who are sitting on high speed bandwidth and have to wait more than 1.5 secs for a response from any web page. Google has raised the bar, time to ditch the straddle technique and go for the Fosbury Flop.
Appropriate Medicine:
The quickest way to …
[Read more]