Book description
How can you bring out MySQL’s full power? With High Performance MySQL, you’ll learn advanced techniques for everything from designing schemas, indexes, and queries to tuning your MySQL server, operating system, and hardware to their fullest potential. This guide also teaches you safe and practical ways to scale applications through replication, load balancing, high availability, and failover.
Updated to reflect recent advances in MySQL and InnoDB performance, features, and tools, this third edition not only offers specific examples of how MySQL works, it also teaches you why this system works as it does, with illustrative stories and case studies that demonstrate MySQL’s principles in action. With this book, you’ll learn how to think in MySQL.
- Learn the effects of new features in MySQL 5.5, including stored procedures, partitioned databases, triggers, and views
- Implement improvements in replication, high availability, and clustering
- Achieve high performance when running MySQL in the cloud
- Optimize advanced querying features, such as full-text searches
- Take advantage of modern multi-core CPUs and solid-state disks
- Explore backup and recovery strategies—including new tools for hot online backups
Publisher resources
Table of contents
- Foreword
- Preface
-
1. MySQL Architecture and History
- MySQL’s Logical Architecture
- Concurrency Control
- Transactions
- Multiversion Concurrency Control
- MySQL’s Storage Engines
- A MySQL Timeline
- MySQL’s Development Model
- Summary
- 2. Benchmarking MySQL
- 3. Profiling Server Performance
- 4. Optimizing Schema and Data Types
-
5. Indexing for High Performance
- Indexing Basics
- Benefits of Indexes
- Indexing Strategies for High Performance
- An Indexing Case Study
- Index and Table Maintenance
- Summary
-
6. Query Performance Optimization
- Why Are Queries Slow?
- Slow Query Basics: Optimize Data Access
- Ways to Restructure Queries
- Query Execution Basics
- Limitations of the MySQL Query Optimizer
- Query Optimizer Hints
- Optimizing Specific Types of Queries
- Case Studies
- Summary
- 7. Advanced MySQL Features
-
8. Optimizing Server Settings
- How MySQL’s Configuration Works
- What Not to Do
- Creating a MySQL Configuration File
- Configuring Memory Usage
- Configuring MySQL’s I/O Behavior
- Configuring MySQL Concurrency
- Workload-Based Configuration
- Completing the Basic Configuration
- Safety and Sanity Settings
- Advanced InnoDB Settings
- Summary
-
9. Operating System and Hardware Optimization
- What Limits MySQL’s Performance?
- How to Select CPUs for MySQL
- Balancing Memory and Disk Resources
- Solid-State Storage
- Choosing Hardware for a Replica
- RAID Performance Optimization
- Storage Area Networks and Network-Attached Storage
- Using Multiple Disk Volumes
- Network Configuration
- Choosing an Operating System
- Choosing a Filesystem
- Choosing a Disk Queue Scheduler
- Threading
- Swapping
- Operating System Status
- Summary
-
10. Replication
- Replication Overview
- Setting Up Replication
- Replication Under the Hood
- Replication Topologies
- Replication and Capacity Planning
- Replication Administration and Maintenance
-
Replication Problems and Solutions
- Errors Caused by Data Corruption or Loss
- Using Nontransactional Tables
- Mixing Transactional and Nontransactional Tables
- Nondeterministic Statements
- Different Storage Engines on the Master and Replica
- Data Changes on the Replica
- Nonunique Server IDs
- Undefined Server IDs
- Dependencies on Nonreplicated Data
- Missing Temporary Tables
- Not Replicating All Updates
- Lock Contention Caused by InnoDB Locking Selects
- Writing to Both Masters in Master-Master Replication
- Excessive Replication Lag
- Oversized Packets from the Master
- Limited Replication Bandwidth
- No Disk Space
- Replication Limitations
- How Fast Is Replication?
- Advanced Features in MySQL Replication
- Other Replication Technologies
- Summary
-
11. Scaling MySQL
- What Is Scalability?
-
Scaling MySQL
- Planning for Scalability
- Buying Time Before Scaling
- Scaling Up
-
Scaling Out
- Functional partitioning
- Data sharding
- Choosing a partitioning key
- Multiple partitioning keys
- Querying across shards
- Allocating data, shards, and nodes
- Arranging shards on nodes
- Fixed allocation
- Dynamic allocation
- Mixing dynamic and fixed allocation
- Explicit allocation
- Rebalancing shards
- Generating globally unique IDs
- Tools for sharding
- Scaling by Consolidation
- Scaling by Clustering
- Scaling Back
- Load Balancing
- Summary
- 12. High Availability
- 13. MySQL in the Cloud
- 14. Application-Level Optimization
-
15. Backup and Recovery
- Why Backups?
- Defining Recovery Requirements
- Designing a MySQL Backup Solution
- Managing and Backing Up Binary Logs
- Backing Up Data
- Recovering from a Backup
- Backup and Recovery Tools
- Scripting Backups
- Summary
- 16. Tools for MySQL Users
- A. Forks and Variants of MySQL
- B. MySQL Server Status
- C. Transferring Large Files
- D. Using EXPLAIN
- E. Debugging Locks
- F. Using Sphinx with MySQL
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: High Performance MySQL, 3rd Edition
- Author(s):
- Release date: March 2012
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449314286
You might also like
book
High Performance MySQL, 4th Edition
How can you realize MySQL's full power? With High Performance MySQL, you'll learn advanced techniques for …
book
High Performance MySQL, 2nd Edition
High Performance MySQL is the definitive guide to building fast, reliable systems with MySQL. Written by …
book
Learning MySQL, 2nd Edition
Get a comprehensive overview on how to set up and design an effective database with MySQL. …
book
Efficient MySQL Performance
You'll find several books on basic or advanced MySQL performance, but nothing in between. That's because …