Review of High Performance MySQL
High Performance MySQL: Optimization, Backups, Replication, and Load Balancing is written by Jeremy D. Zawodny and Derek J. Balling and published by O'Reilly.
phpBB Smith rates this book 3 out of 5.
Ready to Learn?
Are you ready to learn some advanced management techniques that will greatly improve your use of MySQL? If so, then this is the book for you.
High Performance MySQL is packed full of information and strategies that can take almost any site's MySQL installation to new levels of usefulness. Some of these methods have been used on many heavy duty sites, including parts of Yahoo! This book isn't for every MySQL user, however, as you'll come to see in this review.
Let's Start at the Beginning
Before you can use MySQL, you obviously need to install and configure it. For the most part, this book assumes you can and have already done this. Which version of MySQL should you use, though? The authors choose to use MySQL 4, but fortunately, they also try to note differences in MySQL 3.23, which is still widely used, when possible. There is also some occasional discussion of features or possible improvements that may appear in future releases.
The first chapter begins with a short discussion of which MySQL package you should choose to install and proceeds with some configuration files and options. MySQL 4's ability to change configuration options on the fly is covered briefly. The SHOW commands are also touched on, but are mainly covered later on.
Storage engines, also known as table types, are covered in chapter two. The features of each type, particularly locking and transactions (or the lack thereof), are discussed. It's a good pros and cons chapter to help you decide which storage engine is most appropriate in certain situations. Chapter three goes on to introduce benchmarking and why it should be part of a development process. Several tips are put forth to improve one's benchmarking strategies. Some tools that come with MySQL or are available from one of the authors' web sites are also spotlighted.
For a Wider Audience
Chapters four and five cover indexes and query performance. While you can find discussions of these topics in other books also, these chapters go into more depth than most. Most web developers will be able to learn something useful here even if the rest of the book isn't useful to them. There are several tips and techniques that can improve performance and be used with a wide variety of available MySQL tools. Chapter nine, Backup and Recovery, is also a more general topic like these chapters.
Server Madness
Most of the remaining chapters in the book deal with server level issues and techniques that will not apply to many web developers. If you're a MySQL administrator working on medium to large web sites or a business that provides site hosting, with physical access to your server(s), then you'll certainly find these chapters useful. Smaller web developers or those focusing on single applications won't get much here, though. There's a lot of hardware and software configuration issues here. The chapters, Server Performance Tuning, Replication, Load Balancing and High Availability, and Security, deal mostly with physical server configurations, server software, or similar topics.
Beyond the Norm... or is it?
The book ends with three appendices that cover some useful topics without going quite as far in depth when compared to the normal chapters. Appendix A explains some of the output of two special MySQL commands, SHOW STATUS and SHOW INNODB STATUS. These commands cause MySQL to return a lot of internal status information, such as how many SELECT or DELETE queries have been run. Some of the status information that is most important to performance is explained, but a fair amount of the status counters are also omitted.
Appendix B is a discussion of mytop. This Perl script is essentially another means of displaying the output of the SHOW STATUS and SHOW FULL PROCESSLIST commands. An overview of the script is provided along with instructions for installation, configuration, and performing some common tasks.
The last appendix tackles phpMyAdmin, a popular web-based application for MySQL management. This appendix is very limited however, providing only brief overviews of some common tasks such as user maintenance, executing SQL commands, and exporting data. There are nine screen shots, which actually take up more room than all the text in this appendix.
Some Final Drawbacks and Bonuses
To wrap this up, let's look at the last few flaws and features in this book. There are a lot of Perl scripts mentioned in the book, many of which are available from one of the authors' web sites. There is also a web site for the book, but as of this writing, there is no useful information there. The authors mention in the book that they will being adding information to the site, but as of yet this has not happened.
Users of Windows servers may have a rough time with some of these techniques and scripts presented, as the text is clearly aimed at Unix-like systems (the authors even state that none of the scripts are tested on Windows). There are also some typos scattered throughout the book, some of which are bad enough to interrupt your train of thought when reading. The authors do hint that a Second Edition may be on the way, so you may want to keep an eye open for that.
Experienced web developers and MySQL administrators will find High Performance MySQL to provide them with some very good strategies. You'll get different things out of it depending on your situation, though. Only about half of the book is likely to be useful unless you're both a web developer and a MySQL administrator with server access.