Thursday, August 31st, 2006Man vs. MySQL, the Road to Victory!
Steps:
- Notice that site has become really slow the last few days.
- Stumble upon a fantastic resource by Ian Gilfillan for people with limited MySQL experience.
- Slap forehead and finally turn on slow query logging to find queries that take more than one second.
- Realize that, oh crap, we’re reading every row in the session id table constantly.
- Add an index to the session id table to fix that.
- Try to fix other expensive queries that use sorting.
- Fix those by upping the startup variables that effect sorting cache.
- Forgive self for rookie mistakes because I’m a CSS jockey not a DBA.


As the quasi-PR person for Newshutch, I keep track of what people are saying about us. I do this by looking at referrer traffic, blog/forum comments, and with 


