MySQL優化概覽-譯自MySQL5.6手冊

Optimization Overview 優化概覽

1.Optimizing SQL Statements 優化SQL語句

  • 1.1 Optimizing SELECT Statements 優化SELECT語句算法

    • (1)WHERE Clause Optimization WHERE子句優化
    • (2)Range Optimization 範圍查詢的優化
    • (3)Index Merge Optimization 索引合併優化
    • (4)Engine Condition Pushdown Optimization 引擎層面的Pushdown優化
    • (5)Index Condition Pushdown Optimization 索引層面的Pushdown優化
    • (6)Nested-Loop Join Algorithms 嵌套循環鏈接算法
    • (7)Nested Join Optimization 嵌套鏈接優化
    • (8)Left Join and Right Join Optimization 左鏈接和右鏈接優化
    • (9)Outer Join Simplification 簡化外鏈接
    • (10)Multi-Range Read Optimization 多範圍查詢的優化
    • (11)Block Nested-Loop and Batched Key Access Joins BNL鏈接算法和BKA鏈接算法
    • (12)IS NULL Optimization IS NULL優化
    • (13)ORDER BY Optimization ORDER BY優化
    • (14)GROUP BY Optimization GROUP BY優化
    • (15)DISTINCT Optimization DISTINCT優化
    • (16)LIMIT Query Optimization LIMIT查詢優化
    • (17)Function Call Optimization 函數調用優化
    • (18)Row Constructor Expression Optimization 行構造器表達式優化
    • (19)Avoiding Full Table Scans 避免全表掃描
  • 1.2 Optimizing Subqueries, Derived Tables, and Views 優化子查詢,派生表和視圖數據庫

    • (1)Optimizing Subqueries with Semi-Join Transformations 使用半鏈接代替子查詢
    • (2)Optimizing Subqueries with Materialization 使用Materialization優化子查詢
    • (3)Optimizing Derived Tables 優化派生表
    • (4)Optimizing Subqueries with the EXISTS Strategy 使用EXISTS策略優化子查詢
  • 1.3 Optimizing INFORMATION_SCHEMA Queries 優化INFORMATION_SCHEMA查詢
  • 1.4 Optimizing Data Change Statements 優化INSERT/UPDATE/DELETE語句緩存

    • (1)優化INSERT語句
    • (2)優化UPDATE語句
    • (3)優化DELETE語句
  • 1.5 Optimizing Database Privileges 優化數據庫權限服務器

    • 權限設置越複雜,SQL語句的開銷就越大。簡化由GRANT語句創建的權限,能夠使MySQL在客戶端執行語句時減小權限檢查的開銷。
  • 1.6 Other Optimization Tips 其餘的優化建議

2.Optimization and Indexes 優化索引

  • 2.1 How MySQL Uses Indexes MySQL是如何使用索引的
  • 2.2 Primary Key Optimization 主鍵索引優化
  • 2.3 Foreign Key Optimization 外鍵優化
  • 2.4 Column Indexes 列索引
  • 2.5 Multiple-Column Indexes 複合索引
  • 2.6 Verifying Index Usage 查看索引使用狀況
  • 2.7 InnoDB and MyISAM Index Statistics Collection InnoDB和MyISAM表索引的統計信息
  • 2.8 Comparison of B-Tree and Hash Indexes B-Tree和Hash索引的比較
  • 2.9 Use of Index Extensions 索引擴展的使用

3.Optimizing Database Structure 優化數據庫結構

  • 3.1 Optimizing Data Size 優化數據大小
  • 3.2 Optimizing MySQL Data Types 優化數據類型網絡

    • (1)Optimizing for Numeric Data 數值類型的優化
    • (2)Optimizing for Character and String Types 字符串類型的優化
    • (3)Optimizing for BLOB Types BLOB類型的優化
    • (4)Using PROCEDURE ANALYSE 使用PROCEDURE ANALYSE來選擇最佳數據類型
  • 3.3 Optimizing for Many Tables 多張表的優化函數

    • (1)How MySQL Opens and Closes Tables MySQL是如何打開和關閉表的
    • (2)Disadvantages of Creating Many Tables in the Same Database 在同一數據庫中建立大量表的缺點
  • 3.4 Internal Temporary Table Use in MySQL 臨時表的使用

4.Optimizing for InnoDB Tables InnoDB表的優化

  • 4.1 Optimizing Storage Layout for InnoDB Tables 優化InnoDB表的存儲方式
  • 4.2 Optimizing InnoDB Transaction Management 優化InnoDB事務管理
  • 4.3 Optimizing InnoDB Read-Only Transactions 優化InnoDB只讀事務
  • 4.4 Optimizing InnoDB Redo Logging 優化InnoDB還原日誌
  • 4.5 Bulk Data Loading for InnoDB Tables InnoDB表加載大量數據的優化
  • 4.6 Optimizing InnoDB Queries InnoDB查詢的優化
  • 4.7 Optimizing InnoDB DDL Operations InnoDB DDL操做的優化
  • 4.8 Optimizing InnoDB Disk I/O InnoDB磁盤I/O的優化
  • 4.9 Optimizing InnoDB Configuration Variables InnoDB配置變量的優化
  • 4.10 Optimizing InnoDB for Systems with Many Tables 系統有多個表時InnoDB的優化

5.Optimizing for MyISAM Tables MyISAM表的優化

  • 5.1 Optimizing MyISAM Queries 優化MyISAM表的查詢
  • 5.2 Bulk Data Loading for MyISAM Tables MyISAM表加載大量數據的優化
  • 5.3 Optimizing REPAIR TABLE Statements 優化REPAIR TABLE語句

6.Optimizing for MEMORY Tables MEMORY表的優化

7.Understanding the Query Execution Plan 分析查詢執行計劃

  • 7.1 Optimizing Queries with EXPLAIN 用EXPLAIN分析查詢語句
  • 7.2 EXPLAIN Output Format EXPLAIN語句輸出格式
  • 7.3 Extended EXPLAIN Output Format 擴展EXPLAIN語句輸出格式
  • 7.4 Estimating Query Performance 評估查詢性能

8.Controlling the Query Optimizer 管理查詢優化器

  • 8.1 Controlling Query Plan Evaluation 控制查詢計劃的評估配置
  • 8.2 Switchable Optimizations 可切換的優化策略
  • 8.3 Index Hints 索引提示

9.Buffering and Caching 緩衝和緩存

  • 9.1 InnoDB Buffer Pool Optimization InnoDB緩衝池優化
  • 9.2 The MyISAM Key Cache MyISAM索引緩存oop

    • (1)Shared Key Cache Access 索引緩存的共享訪問
    • (2)Multiple Key Caches 多個索引緩存
    • (3)Midpoint Insertion Strategy 中點插入策略
    • (4)Index Preloading 索引預加載
    • (5)Key Cache Block Size 索引緩存的區塊大小
    • (6)Restructuring a Key Cache 重建索引緩存
  • 9.3 The MySQL Query Cache MySQL查詢緩存性能

    • (1)How the Query Cache Operates 查詢緩存是如何發揮做用的
    • (2)Query Cache SELECT Options SELECT語句中有關查詢緩存的兩個選項
    • (3)Query Cache Configuration 查詢緩存配置
    • (4)Query Cache Status and Maintenance 查詢緩存狀態和維護
  • 9.4 Caching of Prepared Statements and Stored Programs 已處理語句和存儲程序的緩存

10.Optimizing Locking Operations 優化鎖操做

  • 10.1 Internal Locking Methods 內部鎖操做
  • 10.2 Table Locking Issues 表的鎖定問題
  • 10.3 Concurrent Inserts 批量插入
  • 10.4 Metadata Locking 元數據鎖
  • 10.5 External Locking 外部鎖

11.Optimizing the MySQL Server 優化MySQL服務器

  • 11.1 System Factors 系統因素
  • 11.2 Optimizing Disk I/O 優化磁盤I/O
  • 11.3 Using Symbolic Links 使用符號連接測試

    • (1)Using Symbolic Links for Databases on Unix 在Unix上的數據庫中使用符號連接
    • (2)Using Symbolic Links for MyISAM Tables on Unix 在Unix上的MyISAM表中使用符號連接
    • (3)Using Symbolic Links for Databases on Windows 在Windows上的數據庫中使用符號連接
  • 11.4 Optimizing Memory Use 優化內存使用優化

    • (1)How MySQL Uses Memory MySQL是如何使用內存的
    • (2)Enabling Large Page Support 啓用大頁面支持
  • 11.5 Optimizing Network Use 優化網絡使用

    • (1)How MySQL Uses Threads for Client Connections MySQL客戶端鏈接是如何使用線程的
    • (2)DNS Lookup Optimization and the Host Cache DNS查詢優化和主機緩存

12.Measuring Performance(Benchmarking) 性能測試(Benchmarking)

  • 12.1 Measuring the Speed of Expressions and Functions 測試表達式和函數的速度
  • 12.2 The MySQL Benchmark Suite MySQL基準測試套件
  • 12.3 Using Your Own Benchmarks 使用你本身的基準測試
  • 12.4 Measuring Performance with performance_schema 使用performance_schema測試性能

13.Examining Thread Information 查看線程信息

  • 13.1 Thread Command Values 線程的指令值
  • 13.2 General Thread States 通用線程狀態
  • 13.3 Delayed-Insert Thread States 延遲插入的線程狀態
  • 13.4 Query Cache Thread States 查詢緩存的線程狀態
  • 13.5 Replication Master Thread States 複製中主庫的線程狀態
  • 13.6 Replication Slave I/O Thread States 複製中從庫I/O的線程狀態
  • 13.7 Replication Slave SQL Thread States 複製中從庫SQL的線程狀態
  • 13.8 Replication Slave Connection Thread States 複製中從庫鏈接的線程狀態
  • 13.9 NDB Cluster Thread States NDB集羣的線程狀態
  • 13.10 Event Scheduler Thread States 事件調度器的線程狀態
相關文章
相關標籤/搜索