With modern disks, the mean time for this is usually It takes time for the disk to find a piece ofĭata. Systemīottlenecks typically arise from these sources:ĭisk seeks. Or whether more hardware resources are required. It is possible to tune the application or reconfigure the server Pool, the MyISAM key cache, and the MySQLĪny database application eventually hits hardware limits as theĭatabase becomes more and more busy. Overload physical memory and cause paging. Hold frequently accessed data, but not so large that they The amount of experimentation and tuning for your code.įor caching sized correctly? That is, large enough to Handles most locking issues without involvement from you,Īllowing for better concurrency in the database and reducing Is available for all kinds of workloads withĮxample, by allowing shared access when possible so thatĭatabase operations can run concurrently, and requestingĮxclusive access when appropriate so that critical operations Require less disk I/O to read and write the data. Particular, compressed tables use less disk space and so In practice, theĪdvanced InnoDB performance features meanĭoes each table use an appropriate row format? This choiceĪlso depends on the storage engine used for the table. Optimizing CPU and memory usage canĪlso improve scalability, allowing the database to handle more loadĭefault storage engine for new tables. While other times you might troubleshoot a configuration or code Sometimes you can be proactive and plan in advance for performance, Single database server, or multiple networked database servers. The level of individual SQL statements, entire applications, a (developer, DBA, or a combination of both), you might optimize at Optimization involves configuring, tuning, and measuring This chapter explains how to optimize MySQL performance and providesĮxamples. Table of Contents 9.1 Optimization Overview 9.2 Optimizing SQL Statements 9.2.1 Optimizing SELECT Statements 9.2.2 Optimizing DML Statements 9.2.3 Optimizing Database Privileges 9.2.4 Optimizing INFORMATION_SCHEMA Queries 9.2.5 Other Optimization Tips 9.3 Optimization and Indexes 9.3.1 How MySQL Uses Indexes 9.3.2 Using Primary Keys 9.3.3 Using Foreign Keys 9.3.4 Column Indexes 9.3.5 Multiple-Column Indexes 9.3.6 Verifying Index Usage 9.3.7 InnoDB and MyISAM Index Statistics Collection 9.3.8 Comparison of B-Tree and Hash Indexes 9.3.9 Optimizer Use of Generated Column Indexes 9.4 Optimizing Database Structure 9.4.1 Optimizing Data Size 9.4.2 Optimizing MySQL Data Types 9.4.3 Optimizing for Many Tables 9.4.4 Internal Temporary Table Use in MySQL 9.5 Optimizing for InnoDB Tables 9.5.1 Optimizing Storage Layout for InnoDB Tables 9.5.2 Optimizing InnoDB Transaction Management 9.5.3 Optimizing InnoDB Read-Only Transactions 9.5.4 Optimizing InnoDB Redo Logging 9.5.5 Bulk Data Loading for InnoDB Tables 9.5.6 Optimizing InnoDB Queries 9.5.7 Optimizing InnoDB DDL Operations 9.5.8 Optimizing InnoDB Disk I/O 9.5.9 Optimizing InnoDB Configuration Variables 9.5.10 Optimizing InnoDB for Systems with Many Tables 9.6 Optimizing for MyISAM Tables 9.6.1 Optimizing MyISAM Queries 9.6.2 Bulk Data Loading for MyISAM Tables 9.6.3 Speed of REPAIR TABLE Statements 9.7 Optimizing for MEMORY Tables 9.8 Understanding the Query Execution Plan 9.8.1 Optimizing Queries with EXPLAIN 9.8.2 EXPLAIN Output Format 9.8.3 EXPLAIN EXTENDED Output Format 9.8.4 Obtaining Execution Plan Information for a Named Connection 9.8.5 Estimating Query Performance 9.9 Controlling the Query Optimizer 9.9.1 Controlling Query Plan Evaluation 9.9.2 Controlling Switchable Optimizations 9.9.3 Optimizer Hints 9.9.4 Index Hints 9.9.5 The Optimizer Cost Model 9.10 Buffering and Caching 9.10.1 InnoDB Buffer Pool Optimization 9.10.2 The MyISAM Key Cache 9.10.3 The MySQL Query Cache 9.10.4 Caching of Prepared Statements and Stored Programs 9.11 Optimizing Locking Operations 9.11.1 Internal Locking Methods 9.11.2 Table Locking Issues 9.11.3 Concurrent Inserts 9.11.4 Metadata Locking 9.11.5 External Locking 9.12 Optimizing the MySQL Server 9.12.1 System Factors and Startup Parameter Tuning 9.12.2 Tuning Server Parameters 9.12.3 Optimizing Disk I/O 9.12.4 Using Symbolic Links 9.12.5 Optimizing Memory Use 9.12.6 Optimizing Network Use 9.13 Measuring Performance (Benchmarking) 9.13.1 Measuring the Speed of Expressions and Functions 9.13.2 Using Your Own Benchmarks 9.13.3 Measuring Performance with performance_schema 9.14 Examining Thread Information 9.14.1 Thread Command Values 9.14.2 General Thread States 9.14.3 Query Cache Thread States 9.14.4 Replication Master Thread States 9.14.5 Replication Slave I/O Thread States 9.14.6 Replication Slave SQL Thread States 9.14.7 Replication Slave Connection Thread States 9.14.8 MySQL Cluster Thread States 9.14.9 Event Scheduler Thread States
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |