Foreword.
Preface
1. MySQL Architecture
MySQLs Logical Architecture
Concurrency Control
Transactions
Multiversion Concurrency Control
MySQLs Storage Engines
2. Finding Bottlenecks: Benchmarking and Profiling
Why Benchmark?
Benchmarking Strategies
Benchmarking Tactics
Benchmarking Tools
Benchmarking Examples
Profiling
Operating System Profiling
3. Schema Optimization and Indexing
Choosing Optimal Data Types
Indexing Basics
Indexing Strategies for High Performance
An Indexing Case Study
Index and Table Maintenance
Normalization and Denormalization
Speeding Up ALTER TABLE
Notes on Storage Engines
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
User-Defined Variables
5. Advanced MySQL Features
The MySQL Query Cache
Storing Code Inside MySQL
Cursors
Prepared Statements
User-Defined Functions
Views
Character Sets and Collations
Full-Text Searching
Foreign Key Constraints
Merge Tables and Partitioning
Distributed (XA) Transactions
6. Optimizing Server Settings
Configuration Basics
General Tuning
Tuning MySQLs I/O Behavior
Tuning MySQL Concurrency
Workload-Based Tuning
Tuning Per-Connection Settings
7. Operating System and Hardware Optimization
What Limits MySQLs 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
Using Multiple Disk Volumes
Network Configuration
Choosing an Operating System
Choosing a Filesystem
Threading
Swapping
Operating System Status..
8. Replication
Replication Overview
Setting Up Replication
Replication Under the Hood
Replication Topologies
Replication and Capacity Planning
Replication Administration and Maintenance
Replication Problems and Solutions
How Fast Is Replication?
The Future of MySQL Replication
9. Scaling and High Availability
Terminology
Scaling MySQL
Load Balancing
High Availability
10. Application-Level Optimization
Application Performance Overview
Web Server Issues
Caching
Extending MySQL
Alternatives to MySQL
11. Backupand Recovery
Overview
Considerations and Tradeoffs
Managing and Backing Up Binary Logs
Backing Up Data
Recovering from a Backup
Backup and Recovery Speed
Backup Tools
Scripting Backups
12. Security
Terminology
Account Basics
Operating System Security
Network Security
Data Encryption
MySQL in a chrooted Environment
13. MySQL Server Status
System Variables
SHOW STATUS
SHOW INNODB STATUS
SHOW PROCESSLIST
SHOW MUTEX STATUS
Replication Status
INFORMATION_SCHEMA
14. Tools for High Performance
Interface Tools
Monitoring Tools
Analysis Tools
MySQL Utilities
Sources of Further Information
A. Transferring Large Files
B. Using EXPLAIN
C. Using Sphinx with MySQL
D. Debugging Locks
Index