After the Launch – Simple Database Tuning.
About two years ago, Jumpchart was already a bigish app (for us) and Staction was growing fast after its release. We realized we would need to do something to increase performance so that our users wouldn’t feel our growing pains.
Besides the easy approach of just getting faster hardware, we also decided to dive into database tweaks – and couldn’t have been happier about the results. Or more surprised.
Like many (probably most) applications for the Web, all of our apps run on MySQL. And while we’re old schoolers at it, we never really worried much about how fast each SQL query was. When your app is small, it hardly matters if you have poorly written queries or inefficient table indexes. Once you start getting the first thousands of daily hits, bad code comes back to bite you. Hard.
The first step we took was to develop code that would tell us exactly which queries weren’t performing well. By adding some timers to our OO database handler, we easily had after the first few days a huge log of all queries that were performing poorly in our MySQL server. It’s really a great way to keep track of how database performance evolves in your app.
Keep Reading