Monthly Archives: June 2005

Review: High Performance MySQL

Review by Steve Suehring

Knowing that Jeremy Zawodny works with MySQL in a highly demanding environment at Yahoo! Finance, I have to admit that I was somewhat anxious to crack open a copy of the book “High Performance MySQL” published by O’Reilly and written by Jeremy and Derek J. Balling. With high expectations, it would be easy to be disappointed with the content or level of the material in the book. Far from disappointing, “High Performance MySQL” was exactly what I had hoped it would be and more.

With a title like “High Performance MySQL” the reader should not expect assistance with tasks such as installation or the basics of SQL. The authors of “High Performance MySQL” acknowledge that the book isn’t meant for the MySQL beginner. Even so, the book does spend a little time going over a refresher of MySQL for the reader. If the reader is looking for a book on the basics of MySQL, I’d recommend picking up a different title. I might be so brazen as to suggest looking at the book on MySQL that I wrote a couple years ago but I’ll leave it for the reader to find an appropriate title for their level of knowledge with MySQL.

The book is broken out over ten chapters beginning with a chapter on the basics of MySQL as seen from someone with some level of MySQL experience. As someone with some level of MySQL knowledge, this chapter didn’t seem to be too painful of a read. That statement begs for a further explanation. I find it painful to read books that claim to have advanced topics but find it necessary to spend (or waste) time by giving yet another explanation of how to type ./configure; make; make install in the beginning chapter. In this regard, I find “High Performance MySQL” to be quite good at providing the appropriate level of explanation for the audience.

The first pages alone are a great starting point for those who are wondering
about the performance as it relates to the different versions of MySQL. A discussion of the binary versions of MySQL versus the source code versions gives the reader a good understanding of the implications of this important decision. Choosing correctly between the versions of MySQL can help to maximize performance.

Though the first chapter is titled “Back to Basics”, most chapters include some basic or background information pertinent to that chapter. For example, both the query and index performance-related chapters include sections with the word ‘Basic’ in their titles. These two chapters, “Index Performance” and “Query Performance” are often misunderstood when considering performance on a database. Naturally, any database administrator worth their pay (insert your own joke here) will tell you that an index can help to improve performance. But “High Performance MySQL” takes it a step further diving into why you might use a particular index given your database needs. This type of practical information is common throughout the book. Rather than just give the reader a listing of the indexes (which are mostly common among RDBMS anyway), the authors choose to tell you why you might choose one method over another.

Other chapters within “High Performance MySQL” include chapters on server performance tuning, replication, load balancing and high availability, backup and recovery, and security. I’ve followed MySQL forums and mailing lists over the years and some of the more common questions relate to MySQL security. The chapter on security gives the reader a great explanation of the MySQL GRANT tables and includes a sidebar on the significance of ‘localhost’ in MySQL which nearly always seems to be a source of confusion, though maybe not for the reader of this particular book. Like other chapters, the security chapter includes tips for the underlying environment upon which MySQL operates. For example, regardless of how good the MySQL database permissions are configured, if
another piece of software on the server isn’t kept up to date then the entire server, including the MySQL data could be compromised.

Looking back at the book, I might have laid the chapters out in a different order or provided more structure through sections of the book. However, this can be dismissed as personal opinion and is non-substantive anyway. I believe “High Performance MySQL” is an excellent choice for the MySQL administrator or developer not only looking to improve their database performance but also to improve their knowledge of MySQL.

Review: The Linux Cookbook

Recently got a copy of The Linux Cookbook Second Edition by Michael Stutz, published by No Starch Press. It’s quite a hefty book, coming in at 695 pages of chapters and then another ~40 pages of Appendices. The book is geared directly towards desktop and workstation users, and as one would expect from a cookbook-style book, it’s task-oriented.

The book is very comprehensive, going through 34 chapters of everything from how to use command-recall to how to edit sound files, and a lot more. It would be pointless for me to try to list everything that the book goes through since there’s so much, so have a look at the table of contents. Well, it turns out that I can’t link directly to the table of contents for the title since the No Starch Press web site is using frames and thus direct linking isn’t readily available. Yes, I could view the source and link there, but maybe they should make linking to their site easier too! Suffice it to say that the book has a lot of good recipes to help desktop users.

I liked the book’s positive coverage of Debian but I do wonder how realistic that such coverage is for this audience who would presumably be using one of the newbie distributions like Red Hat or Mandrake. Of course, if the book didn’t cover Debian I would be very critical of it for ignoring the popular distro. So it’s a no-win situation, but I’m happy to see the Debian coverage in this type of book nonetheless.

I like books that come right out and tell you what they won’t try to show you, as this title does on page 10. This seems quite responsible and would thus prevent a potential system administrator or developer from picking this title up thinking that it’s going to help. Rather, the author makes sure that you know the book is right for you. It is for this reason that I feel comfortable recommending the title for desktop users who want to get things done in Linux. The book won’t show you all of the intricacies of each and every aspect of Linux nor does it claim to do so.

The Linux Cookbook is yet another good title from No Starch that deserves space on just about any Linux desktop user’s shelf.