High Performance MySQL, 2nd Edition
Optimization, Backups, Replication, and More
Publisher: O'Reilly Media
Release Date: December 2008
Pages: 712
Read on Safari with a 10-day trial
Start your free trial now Buy on AmazonWhere’s the cart? Now you can get everything on Safari. To purchase books, visit Amazon or your favorite retailer. Questions? See our FAQ or contact customer service:
1-800-889-8969 / 707-827-7019
support@oreilly.com
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.
Table of Contents
-
Chapter 1 MySQL Architecture
-
MySQL's Logical Architecture
-
Concurrency Control
-
Transactions
-
Multiversion Concurrency Control
-
MySQL's Storage Engines
-
-
Chapter 2 Finding Bottlenecks: Benchmarking and Profiling
-
Why Benchmark?
-
Benchmarking Strategies
-
Benchmarking Tactics
-
Benchmarking Tools
-
Benchmarking Examples
-
Profiling
-
Operating System Profiling
-
-
Chapter 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
-
-
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
-
User-Defined Variables
-
-
Chapter 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
-
-
Chapter 6 Optimizing Server Settings
-
Configuration Basics
-
General Tuning
-
Tuning MySQL's I/O Behavior
-
Tuning MySQL Concurrency
-
Workload-Based Tuning
-
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
-
Using Multiple Disk Volumes
-
Network Configuration
-
Choosing an Operating System
-
Choosing a Filesystem
-
Threading
-
Swapping
-
Operating System Status
-
-
Chapter 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
-
-
Chapter 9 Scaling and High Availability
-
Terminology
-
Scaling MySQL
-
Load Balancing
-
High Availability
-
-
Chapter 10 Application-Level Optimization
-
Application Performance Overview
-
Web Server Issues
-
Caching
-
Extending MySQL
-
Alternatives to MySQL
-
-
Chapter 11 Backup and 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
-
-
Chapter 12 Security
-
Terminology
-
Account Basics
-
Operating System Security
-
Network Security
-
Data Encryption
-
MySQL in a chrooted Environment
-
-
Chapter 13 MySQL Server Status
-
System Variables
-
SHOW STATUS
-
SHOW INNODB STATUS
-
SHOW PROCESSLIST
-
SHOW MUTEX STATUS
-
Replication Status
-
INFORMATION_SCHEMA
-
-
Chapter 14 Tools for High Performance
-
Interface Tools
-
Monitoring Tools
-
Analysis Tools
-
MySQL Utilities
-
Sources of Further Information
-
-
Appendix Transferring Large Files
-
Copying Files
-
File Copy Benchmarks
-
-
Appendix Using EXPLAIN
-
Invoking EXPLAIN
-
The Columns in EXPLAIN
-
Visual EXPLAIN
-
-
Appendix Using Sphinx with MySQL
-
Overview: A Typical Sphinx Search
-
Why Use Sphinx?
-
Architectural Overview
-
Special Features
-
Practical Implementation Examples
-
Conclusion
-
-
Appendix Debugging Locks
-
Lock Waits at the Server Level
-
Lock Waits in Storage Engines
-
-
Colophon