Table of Contents
- 7.1. Optimization Overview
- 7.2. Optimizing SQL Statements
- 7.3. Optimization and Indexes
- 7.4. Optimizing Database Structure
- 7.5. Optimizing for
InnoDB
Tables - 7.5.1. Optimizing Storage Layout for
InnoDB
Tables - 7.5.2. Optimizing
InnoDB
Transaction Management - 7.5.3. Optimizing
InnoDB
Logging - 7.5.4. Bulk Data Loading for
InnoDB
Tables - 7.5.5. Optimizing
InnoDB
Queries - 7.5.6. Optimizing
InnoDB
DDL Operations - 7.5.7. Optimizing
InnoDB
Disk I/O - 7.5.8. Optimizing
InnoDB
Configuration Variables - 7.5.9. Optimizing
InnoDB
for Systems with Many Tables
- 7.5.1. Optimizing Storage Layout for
- 7.6. Optimizing for
MyISAM
Tables - 7.7. Optimizing for
MEMORY
Tables - 7.8. Understanding the Query Execution Plan
- 7.9. Buffering and Caching
- 7.10. Optimizing Locking Operations
- 7.11. Optimizing the MySQL Server
- 7.12. Measuring Performance (Benchmarking)
- 7.13. Internal Details of MySQL Optimizations
- 7.13.1. Range Optimization
- 7.13.2. Index Merge Optimization
- 7.13.3. Engine Condition Pushdown Optimization
- 7.13.4.
IS NULL
Optimization - 7.13.5.
LEFT JOIN
andRIGHT JOIN
Optimization - 7.13.6. Nested-Loop Join Algorithms
- 7.13.7. Nested Join Optimization
- 7.13.8. Outer Join Simplification
- 7.13.9.
ORDER BY
Optimization - 7.13.10.
GROUP BY
Optimization - 7.13.11.
DISTINCT
Optimization - 7.13.12. Optimizing
IN
/=ANY
Subqueries
This chapter explains how to optimize MySQL performance and provides examples. Optimization involves configuring, tuning, and measuring performance, at several levels. Depending on your job role (developer, DBA, or a combination of both), you might optimize at the level of individual SQL statements, entire applications, a single database server, or multiple networked database servers. Sometimes you can be proactive and plan in advance for performance, while other times you might troubleshoot a configuration or code issue after a problem occurs. Optimizing CPU and memory usage can also improve scalability, allowing the database to handle more load without slowing down.