| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 22 Dec 2025 16:38:09 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090204151923
location: https://web.archive.org/web/20090204151923/https://dev.mysql.com/doc/refman/5.1/en/optimization.html
server-timing: captures_list;dur=0.540006, exclusion.robots;dur=0.051975, exclusion.robots.policy;dur=0.041555, esindex;dur=0.008573, cdx.remote;dur=6.109419, LoadShardBlock;dur=202.942229, PetaboxLoader3.datanode;dur=82.373441, PetaboxLoader3.resolve;dur=14.853401
x-app-server: wwwb-app221-dc8
x-ts: 302
x-tr: 233
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app221; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 22 Dec 2025 16:38:10 GMT
content-type: text/html
x-archive-orig-date: Wed, 04 Feb 2009 15:19:22 GMT
x-archive-orig-server: Apache/2.0.58 (Unix) mod_ssl/2.0.58 OpenSSL/0.9.7f
x-archive-orig-expires: Thu, 19 Nov 1981 08:52:00 GMT
x-archive-orig-cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
x-archive-orig-pragma: no-cache
x-archive-orig-connection: close
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: maccentraleurope
memento-datetime: Wed, 04 Feb 2009 15:19:23 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_8_20090204144814_crawl103-c/51_8_20090204151641_crawl103.arc.gz
server-timing: captures_list;dur=0.528629, exclusion.robots;dur=0.019168, exclusion.robots.policy;dur=0.008164, esindex;dur=0.010024, cdx.remote;dur=5.915615, LoadShardBlock;dur=214.121899, PetaboxLoader3.datanode;dur=175.501755, PetaboxLoader3.resolve;dur=156.420907, load_resource;dur=179.892161
x-app-server: wwwb-app221-dc8
x-ts: 200
x-tr: 460
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
MySQL :: MySQL 5.1 Reference Manual :: 7 Optimization
Skip navigation links
The world's most popular open source database
- Documentation Library
- Table of Contents
- MySQL 6.0 Reference Manual
- MySQL 5.1 Reference Manual
- MySQL 5.0 Reference Manual
- MySQL 3.23/4.0/4.1 Manual
- Table of Contents
MySQL 5.1 Reference Manual :: 7 Optimization
Section Navigation [Toggle]
- Preface
- 1 General Information
- 2 Installing and Upgrading MySQL
- 3 Tutorial
- 4 MySQL Programs
- 5 MySQL Server Administration
- 6 Backup and Recovery
- 7 Optimization
- 8 Language Structure
- 9 Internationalization and Localization
- 10 Data Types
- 11 Functions and Operators
- 12 SQL Statement Syntax
- 13 Storage Engines
- 14 High Availability and Scalability
- 15 MySQL Enterprise Monitor
- 16 Replication
- 17 MySQL Cluster NDB 6.x
- 18 Partitioning
- 19 Stored Programs and Views
- 20 INFORMATION_SCHEMA Tables
- 21 Connectors and APIs
- 22 Extending MySQL
- A MySQL 5.1 Frequently Asked Questions
- B Errors, Error Codes, and Common Problems
- C MySQL Change History
- D Restrictions and Limits
- Index
Table of Contents [+/-]
- 7.1. Optimization Overview [+/-]
- 7.2. Optimizing
SELECTand Other Statements [+/-] - 7.2.1. Optimizing Queries with
EXPLAIN - 7.2.2. Estimating Query Performance
- 7.2.3. Speed of
SELECTQueries - 7.2.4.
WHEREClause Optimization - 7.2.5. Range Optimization
- 7.2.6. Index Merge Optimization
- 7.2.7. Condition Pushdown Optimization
- 7.2.8.
IS NULLOptimization - 7.2.9.
LEFT JOINandRIGHT JOINOptimization - 7.2.10. Nested-Loop Join Algorithms
- 7.2.11. Nested Join Optimization
- 7.2.12. Outer Join Simplification
- 7.2.13.
ORDER BYOptimization - 7.2.14.
GROUP BYOptimization - 7.2.15.
DISTINCTOptimization - 7.2.16. Optimizing
IN/=ANYSubqueries - 7.2.17.
LIMITOptimization - 7.2.18. How to Avoid Table Scans
- 7.2.19.
INFORMATION_SCHEMAOptimization - 7.2.20. Speed of
INSERTStatements - 7.2.21. Speed of
UPDATEStatements - 7.2.22. Speed of
DELETEStatements - 7.2.23. Other Optimization Tips
- 7.2.1. Optimizing Queries with
- 7.3. Locking Issues [+/-]
- 7.4. Optimizing Database Structure [+/-]
- 7.4.1. Design Choices
- 7.4.2. Make Your Data as Small as Possible
- 7.4.3. Column Indexes
- 7.4.4. Multiple-Column Indexes
- 7.4.5. How MySQL Uses Indexes
- 7.4.6. The
MyISAMKey Cache - 7.4.7.
MyISAMIndex Statistics Collection - 7.4.8. How MySQL Opens and Closes Tables
- 7.4.9. Disadvantages of Creating Many Tables in the Same Database
- 7.5. Optimizing the MySQL Server [+/-]
- 7.5.1. System Factors and Startup Parameter Tuning
- 7.5.2. Tuning Server Parameters
- 7.5.3. Controlling Query Optimizer Performance
- 7.5.4. The MySQL Query Cache
- 7.5.5. Examining Thread Information
- 7.5.6. How Compiling and Linking Affects the Speed of MySQL
- 7.5.7. How MySQL Uses Threads for Client Connections
- 7.5.8. How MySQL Uses Memory
- 7.5.9. How MySQL Uses Internal Temporary Tables
- 7.5.10. How MySQL Uses DNS
- 7.6. Disk Issues [+/-]
Optimization is a complex task because ultimately it requires understanding of the entire system to be optimized. Although it may be possible to perform some local optimizations with little knowledge of your system or application, the more optimal you want your system to become, the more you must know about it.
This chapter tries to explain and give some examples of different ways to optimize MySQL. Remember, however, that there are always additional ways to make the system even faster, although they may require increasing effort to achieve.
© 1995-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.


User Comments
Add your own comment.