Synopses & Reviews
As users come to depend on MySQL, they find that they have to deal with issues of reliability, scalability, and performance--issues that are not well documented but are critical to a smoothly functioning site. This book is an insider's guide to these little understood topics.Author Jeremy Zawodny has managed large numbers of MySQL servers for mission-critical work at Yahoo!, maintained years of contacts with the MySQL AB team, and presents regularly at conferences. Jeremy and Derek have spent months experimenting, interviewing major users of MySQL, talking to MySQL AB, benchmarking, and writing some of their own tools in order to produce the information in this book.In High Performance MySQL you will learn about MySQL indexing and optimization in depth so you can make better use of these key features. You will learn practical replication, backup, and load-balancing strategies with information that goes beyond available tools to discuss their effects in real-life environments. And you'll learn the supporting techniques you need to carry out these tasks, including advanced configuration, benchmarking, and investigating logs.Topics include:
- A review of configuration and setup options
- Storage engines and table types
- Query Optimization
- Application Design
- Server Performance
- Backup and Recovery
Covers the latest version of MySQL, version 4.02.
About the Author
Jeremy Zawodny and his two cats moved from Northwest Ohio to Silicon Valley in late 1999 so he could work for Yahoo!--just in time to witness the .com bubble bursting first-hand. He's been at Yahoo!® ever since, helping to put MySQL and other Open Source technologies to use in fun, interesting, and often very big ways. Starting with the popular and high-traffic Yahoo! Finance site, he worked to make MySQL part of the site's core infrastructure in large batch operations as well as real-time feed processing and serving content directly on the site. He then helped to spread "the MySQL religion" to numerous other groups within Yahoo!, including News, Personals, Sports, and Shopping. Nowadays he acts as Yahoo!'s MySQL guru, working with Yahoo!'s many engineering groups to get the most out of their MySQL deployments.
In 2000, he began writing for Linux Magazine and continues to do so today as a columnist and contributing editor. After over a year of active participation on the MySQL mailing list, he got the idea to write a book about MySQL. (How hard could it be, really?) You can still find him answering questions on the list today. Since 2001, Jeremy has been speaking about MySQL at various conferences (O'Reilly's Open Source Conference, PHPCon, The MySQL User Conference, etc.) and user groups in locations as far away as Bangalore, India. His favorite topics are performance tuning, replication, clustering, and backup/recovery. In more recent times, he's rediscovered his love of aviation, earning a Private Pilot Glider license in early 2003. Since then he's spent far too much of his free time flying gliders out of Hollister, California and Truckee, near Lake Tahoe. He hopes to soon earn his Commercial Pilot license and then go on to become a certified flight instructor someday. Occasional MySQL consulting also helps to pay for his flying addiction.
Jeremy rambles almost daily about technology and life in general on his weblog: www.jeremy.zawodny.com/blog/
Derek J. Balling has been a Linux system administrator since 1996. He has helped build and maintain server infrastructure for companies like Yahoo, and institutions like Vassar College. He has also written articles for The Perl Journal and a number of online magazines, and served on the Program Committee for the 2008 LISA (Large Installation System Administration) Conference. He is currently employed as the Data Center Manager for Answers.com.
When not working on computer-related issues, Derek enjoys spending time with his wife Debbie, and their posse of animals (four cats and a dog). He also makes his opinion known on current events or whatever is annoying him lately on his blog at http://blog.megacity.org/.
Table of Contents
Preface; The Basic Layout of This Book; Software Versions and Availability; Conventions Used in This Book; Using Code Examples; How to Contact Us; Acknowledgments; Chapter 1: Back To Basics; 1.1 Binary Versus Compiled-From-Source Installations; 1.2 Configuration Files; 1.3 The SHOW Commands; Chapter 2: Storage Engines (Table Types); 2.1 MySQL Architecture; 2.2 Locking and Concurrency; 2.3 Transactions; 2.4 Selecting the Right Engine; 2.5 The Storage Engines; Chapter 3: Benchmarking; 3.1 The Importance of Benchmarking; 3.2 Benchmarking Strategies; 3.3 Benchmarking Tools; Chapter 4: Indexes; 4.1 Indexing Basics; 4.2 Index Structures; 4.3 Indexes and Table Types; 4.4 Index Maintenance; Chapter 5: Query Performance; 5.1 Query Processing Basics; 5.2 Optimizer Features and Oddities; 5.3 Identifying Slow Queries; 5.4 Influencing MySQL with Hints; 5.5 Stupid Query Tricks; Chapter 6: Server Performance Tuning; 6.1 Performance-Limiting Factors; 6.2 RAID; 6.3 Operating System; 6.4 Techniques; Chapter 7: Replication; 7.1 Replication Overview; 7.2 Configuring Replication; 7.3 Under the Hood; 7.4 Replication Architectures; 7.5 Administration and Maintenance; 7.6 Common Problems; 7.7 The Future of Replication; Chapter 8: Load Balancing and High Availability; 8.1 Load Balancing Basics; 8.2 Configuration Issues; 8.3 Cluster Partitioning; 8.4 High Availability; Chapter 9: Backup and Recovery; 9.1 Why Backups?; 9.2 Considerations and Tradeoffs; 9.3 Tools and Techniques; 9.4 Rolling Your Own Backup Script; Chapter 10: Security; 10.1 Account Basics; 10.2 The Grant Tables; 10.3 Grant and Revoke; 10.4 Operating System Security; 10.5 Network Security; 10.6 Data Encryption; 10.7 MySQL in a chrooted Environment; Appendix A: The SHOW STATUS and SHOW INNODB STATUS Commands; A.1 SHOW STATUS; A.2 SHOW INNODB STATUS; Appendix B: mytop; B.1 Overview; B.2 Getting mytop; B.3 Configuration and Usage; B.4 Common Tasks; Appendix C: phpMyAdmin; C.1 The Basics; C.2 Practical Examples; Colophon;