High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by noted experts with years of real-world experience building very large systems, this book covers every aspect of MySQL performance in detail, and focuses on robustness, security, and data integrity.
High Performance MySQL teaches you advanced techniques in depth so you can bring out MySQL's full power. Learn how to design schemas, indexes, queries and advanced MySQL features for maximum performance, and get detailed guidance for tuning your MySQL server, operating system, and hardware to their fullest potential. You'll also learn practical, safe, high-performance ways to scale your applications with replication, load balancing, high availability, and failover.
This second edition is completely revised and greatly expanded, with deeper coverage in all areas. Major additions include:
Emphasis throughout on both performance and reliability
Thorough coverage of storage engines, including in-depth tuning and optimizations for the InnoDB storage engine
Effects of new features in MySQL 5.0 and 5.1, including stored procedures, partitioned databases, triggers, and views
A detailed discussion on how to build very large, highly scalable systems with MySQL
New options for backups and replication
Optimization of advanced querying features, such as full-text searches
Four new appendices
The book also includes chapters on benchmarking, profiling, backups, security, and tools and techniques to help you measure, monitor, and manage your MySQL installations.
Chapter 1 MySQL Architecture
MySQL's Logical Architecture
Multiversion Concurrency Control
MySQL's Storage Engines
Chapter 2 Finding Bottlenecks: Benchmarking and Profiling
Operating System Profiling
Chapter 3 Schema Optimization and Indexing
Choosing Optimal Data Types
Indexing Strategies for High Performance
An Indexing Case Study
Index and Table Maintenance
Normalization and Denormalization
Speeding Up ALTER TABLE
Notes on Storage Engines
Chapter 4 Query Performance Optimization
Slow Query Basics: Optimize Data Access
Ways to Restructure Queries
Query Execution Basics
Limitations of the MySQL Query Optimizer
Optimizing Specific Types of Queries
Query Optimizer Hints
Chapter 5 Advanced MySQL Features
The MySQL Query Cache
Storing Code Inside MySQL
Character Sets and Collations
Foreign Key Constraints
Merge Tables and Partitioning
Distributed (XA) Transactions
Chapter 6 Optimizing Server Settings
Tuning MySQL's I/O Behavior
Tuning MySQL Concurrency
Tuning Per-Connection Settings
Chapter 7 Operating System and Hardware Optimization
What Limits MySQL's Performance?
How to Select CPUs for MySQL
Balancing Memory and Disk Resources
Choosing Hardware for a Slave
RAID Performance Optimization
Storage Area Networks and Network-Attached Storage
Baron Schwartz is a software engineer who lives in Charlottesville, Virginia and goes by the online handle of "Xaprb," which is his first name typed in QWERTY on a Dvorak keyboard. When he's not busy solving a fun programming challenge, he relaxes with his wife Lynn and dog Carbon. He blogs about software engineering at http://www.xaprb.com/blog/.
A former manager of the High Performace Group at MySQL AB, Peter Zaitsev now runs the mysqlperformanceblog.com site. He specializes in helping administrators fix issues with Web sites handling millions of visitors a day, dealing with terabytes of data using hundreds of servers. He is used to making changes and upgrades both to hardware to software (such as query optimization) in order to find solutions. He also speaks frequently at conferences.
Vadim Tkachenko was a Performance Engineer in at MySQL AB. As an expert in multithreaded programming and synchronization, his primary tasks were benchmarks, profiling, and finding bottlenecks. He also worked on a number of features for performance monitoring and tuning, and getting MySQL to scale well on multiple CPUs.
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/
Arjen Lentz was born in Amsterdam but has lived in Queensland Australia since the turn of the millennium, sharing his life these days with his beautiful daughter Phoebe and black cat Figaro. Originally a C programmer, Arjen was employee #25 at MySQL AB (2001-2007). After a brief break in 2007, Arjen founded Open Query (http://openquery.com.au), which develops and provides its own data management training and consulting services in the Asia Pacific region and beyond. Arjen also regularly speaks at conferences and user groups. In his abundant spare time Arjen indulges in cooking, gardening, reading, camping, and exploring the RepRap. Arjen's weblog is at http://arjen-lentz.livejournal.com/
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 is on the Program Committee for the 2008 LISA 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 (4 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/.
The animal on the cover of High Performance MySQL is a sparrow hawk (Accipiter nisus), a small woodland member of the falcon family found in Eurasia and North Africa. Sparrow hawks have a long tail and short wings; males are bluish-gray with a light brown breast, and females are more brown-gray and have an almost fully white breast. Males are normally somewhat smaller (11 inches) than females (15 inches).Sparrow hawks live in coniferous woods and feed on small mammals, insects, and birds. They nest in trees and sometimes on cliff ledges. At the beginning of the summer, the female lays four to six white eggs, blotched red and brown, in a nest made in the boughs of the tallest tree available. The male feeds the female and their young.Like all hawks, the sparrow hawk is capable of bursts of high speed in flight. Whether soaring or gliding, the sparrow hawk has a characteristic flap-flap-glide action; its large tail enables the hawk to twist and turn effortlessly in and out of cover.
Comments about oreilly High Performance MySQL, 2nd Edition:
Possibly the only book on the subject. I would recommend this book to any DBAs or Developers who really want to get to know the ins and outs of MySQL. It is a great book for learning as well as a great reference book.
Bottom Line Yes, I would recommend this to a friend
Comments about oreilly High Performance MySQL, 2nd Edition:
What makes this book so much better than any others I've seen in the last 8 years is its focus on the why, rather than the how. Certainly it will tell you some hows as well, but it always keeps focused on the priorities you should have in mind. Simple example: it quotes an AB trainer saying that the best you can improve performance of your queries with hardware is about 10x. On the other hand, you can often improve it 1000x by optimizing your queries. That is the kind of thing you can tell to your boss and have her understand.
I do not mean that there are not a truckload of hows as well in this book - How to set up some benchmarking, major reasons you would pick MyISAM or Innodb, what you can mix and match etc. But the examples always serve their major points.
I will never be a DBA, but this book is all I need to fake it.