Sunday, April 29, 2007
High Performance MySQL
Databases have recently become interesting to me. Previously, they've always seemed like these massive beasts that provide such simple and basic functionality, I didn't understand how companies such as Oracle could make billions selling databases. Yes, it was a dirty word in my vocabularly. And yes, I'm now a reborn DBA in training.
Recently I've been working on a small PHP project reporting statistics on some data from our network. The small project has been collecting for some time now, and has begun to attract some attention. It's also started to slow down considerably. I read a few MySQL performance articles and blog entries, which had quite a few tips and tricks, but in reality I was adding indicies and making config changes without really knowing how to measure the performance differences, or how the change was really affecting my web app. It was blind performance tuning.
And then I picked up "High Performance MySQL". This book is changing my life one page at a time. I've noticed that most of the articles and blogs around MySQL on the web (at least, the ones I could find) were centered around the basic stuff: installation, basic configuration, and cookbook recipes. This book goes to the next level and answers many questions that I've previously had, but didn't have an aggregated place to find.
The key to that last statement is aggregated. I'm sure there are articles out there that explain the differences between InnoDB, and MyISAM, various ways to benchmark your queries to measure performance differences, or methods to cache your queries to improve performance, but having them all aggregated in one place provides context that has proved valuable.
If you're looking for the next level of intelligence on using MySQL in real-world environments, this book is highly recommended.