High Performance MySQL

Learn to Build Fast, Reliable, Scalable Systems with MySQL

The Best MySQL Book On The Planet

The Definitive Guide

High Performance MySQL, 3rd Edition is the definitive guide for building fast, reliable systems with MySQL. The authors are noted experts in the field, with years of real-world experience building very large systems. You’ll get detailed guidance on tuning your MySQL server, operating system, and hardware to their fullest potential. And you’ll learn practical, safe, high-performance ways to scale your applications with replication, load balancing, high availability, and failover.

Praised By Experts

High Performance MySQL teaches techniques in-depth, in clear and lucid writing, to help you tap into MySQL’s full power. You'll learn how to design schemas, indexes, queries, and advanced MySQL features for maximum performance. That's why noted MySQL expert Eric Bergen says it's “the best MySQL book on the planet,” and another reviewer calls it “one of the best tech books I’ve ever read.” Reviewers on Amazon agree it's the best MySQL book in print.

Revised and Expanded

The third edition is completely revised and greatly expanded, with over 800 pages. There are many new topics and deeper coverage in all areas. A notable improvement over the second edition is a systematic, logical approach to performance throughout. The book also includes chapters on benchmarking, profiling, backups, security, and tools and techniques to help you measure, monitor, and manage your MySQL installations. Click here to read a sample chapter.

Written By Trusted Experts

Baron Schwartz

Baron is the founder and CEO of VividCortex, a SaaS platform for database performance monitoring. Formerly the VP of Consulting at Percona, he has extensive background in MySQL performance in the real world. He is the author of several books and many open-source projects. He speaks frequently on system performance, open source, DevOps, and team optimization at universities, major companies, and industry conferences. He's also an Oracle ACE and frequent participant in the PostgreSQL community.

Peter Zaitsev

Peter is the Chief Executive Officer at Percona. Peter was an early employee at MySQL AB, eventually leading the company’s High Performance Group. A serial entrepreneur, Peter co-founded his first startup while attending Moscow State University where he majored in Computer Science. He specializes in helping companies fix issues with high-traffic applications dealing with terabytes of data, using hundreds of servers. He speaks frequently at conferences.

Vadim Tkachenko

Vadim leads Percona's Development group which produces Percona Server, Percona XtraDB, and Percona XtraBackup. He is an expert in LAMP performance, especially optimizing MySQL and InnoDB internals to take full advantage of modern hardware using his multi-threaded programming background. Source code patches authored by Vadim have been incorporated by Oracle Corporation and its predecessors into the mainstream MySQL and InnoDB products.

Downloads and Samples

Sample Chapter

O'Reilly authorized us to post a sample chapter for you to preview. Please enjoy Chapter 8, Optimizing Server Settings. This chapter includes the table of contents. O'Reilly has also posted a sample on their website, so you can read two sample chapters.

Errata are available at the O'Reilly catalog page.

Code Samples

We've also posted code samples from the 3rd edition of High Performance MySQL. One-liner and once-off scripts are not shown here, but generally reusable scripts and queries are, if they're long enough that it's harder to type them than to look them up on this page. If you'd like a particular sample to be added, please contact us and we'll add it for you.

Foreword by Mark Callaghan


I’ve been a fan of this book for years, and the third edition makes a great book even better. Not only do world-class experts share that expertise, but they have taken the time to update and add chapters with high-quality writing. While the book has many details on getting high performance from MySQL, the focus of the book is on the process of improvement rather than facts and trivia. This book will help you figure out how to make things better, regardless of changes in MySQL’s behavior over time.

The authors are uniquely qualified to write this book, based on their experience, principled approach, focus on efficiency, and commitment to improvement. By experience, I mean that the authors have been working on MySQL performance from the days when it didn’t scale and had no instrumentation to the current period where things are much better. By principled approach, I mean that they treat this like a science, first defining problems to be solved and then using reason and measurement to solve those problems.

I am most impressed by their focus on efficiency. As consultants, they don’t have the luxury of time. Clients getting billed by the hour want problems solved quickly. So the authors have defined processes and built tools to get things done correctly and efficiently. They describe the processes in this book and publish source code for the tools.

Finally, they continue to get better at what they do. This includes a shift in concern from throughput to response time, a commitment to understanding the performance of MySQL on new hardware, and a pursuit of new skills like queueing theory that can be used to understand performance.

I believe this book augurs a bright future for MySQL. As MySQL has evolved to support demanding workloads, the authors have led a similar effort to improve the understanding of MySQL performance within the community. They have also contributed directly to that improvement via XtraDB and XtraBackup. I continue to learn from them and hope you take the time to do so as well.

Mark Callaghan, Software Engineer, Facebook



You can buy the book from Amazon. Be careful not to buy the first or second edition; Amazon doesn’t make the distinction very clear. All the links on this site go to the third edition. You can also order the book from O’Reilly’s website.