
2
Contents
MySQL Performance Tuning 3
Query optimization 4
• How to Find and Tune a Slow SQL Query ������������������������������������������������������������������������������������������������������������������������������������������������������������������� 5
• MySQL Query Performance Troubleshooting: Resource-Based Approach ����������������������������������������������������������������������������11
• Using Slow Query Log to Find High Load Spots in MySQL �������������������������������������������������������������������������������������������������������������������������17
• MySQL Key Performance Indicators (KPI) with PMM ������������������������������������������������������������������������������������������������������������������������������������ 22
• How Percona Monitoring and Management Helps You Find Out Why Your MySQL Server Is Stalling ������30
Proper conguration 36
• Easily Validate Conguration Settings in MySQL 8 ���������������������������������������������������������������������������������������������������������������������������������������37
• Don’t Start Using Your MySQL Server Until You’ve Congured Your OS ������������������������������������������������������������������������������������40
Indexing 46
• MySQL Query Performance: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ 47
• Not Just Indexes �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������47
• Putting the Fun in MySQL Functional Indexes ���������������������������������������������������������������������������������������������������������������������������������������������������� 50
• Duplicate, Redundant, and Invisible Indexes ���������������������������������������������������������������������������������������������������������������������������������������������������� 55
• An Overview of Indexes in MySQL 8.0: MySQL CREATE INDEX, Functional Indexes, and More ������������������������������ 60
• Basic Housekeeping for MySQL Indexes �����������������������������������������������������������������������������������������������������������������������������������������������������������������69
Memory/resource allocation 75
• Tuning MySQL After Upgrading Memory �����������������������������������������������������������������������������������������������������������������������������������������������������������������76
• Setting up Resource Limits on Users in MySQL ���������������������������������������������������������������������������������������������������������������������������������������������������81
• Understanding MySQL Memory Usage with Performance Schema ������������������������������������������������������������������������������������������ 84
• MySQL Capacity Planning ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������� 89
InnoDB conguration 93
• InnoDB Performance Optimization Basics ����������������������������������������������������������������������������������������������������������������������������������������������������������� 94
• Tuning MySQL/InnoDB Flushing for a Write-Intensive Workload ���������������������������������������������������������������������������������������������������� 98
• InnoDB File Growth Weirdness �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������105
Data caching 108
• MySQL Data Caching Efciency �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������109
• Impact of Querying Table Information From information_schema ������������������������������������������������������������������������������������������ 113
Partitioning 118
• The Ultimate Guide to MySQL Partitions ������������������������������������������������������������������������������������������������������������������������������������������������������������������119
• Quick Data Archival in MySQL Using Partitions �����������������������������������������������������������������������������������������������������������������������������������������������125
Schema design 131
• Deep Dive Into MySQL Performance Schema ������������������������������������������������������������������������������������������������������������������������������������������������� 132
Cost optimization 146
• Seven Ways To Reduce MySQL Costs in the Cloud ������������������������������������������������������������������������������������������������������������������������������������147
Conclusion 151
相关文档
评论