The document summarizes Peter Zaitsev's presentation on practical MySQL performance optimization. It discusses defining performance, taking a practical approach to achieving needed performance through tools like pt-query-digest and Percona Cloud Tools. It emphasizes examining the complete system, including application transactions and queries, and considering areas like architecture, hardware, schemas, queries, MySQL configuration and version for improvements.
1 of 31
More Related Content
Peter Zaitsev - Practical MySQL Performance Optimization
3. Focus on Thought Process
Right Approach to the problems is a key
It is hard to Google “how to approach things”
Easy to find a lot of specific advice once you know what you
want to do
MySQL Performance Blog has a lot of specific information
High Performance MySQL Book
3
www.percona.com
5. Good Enough
System
needs • Responsiveness
to be • Efficiency
Good
• Scalability
Enough
in
5
www.percona.com
6. Focus on Application
Database
Performance • It does only as it
Does not
impacts an Application
Matter
Database is
a Tool we
use
6
• … and problem are
we deal with
www.percona.com
7. Things to Note
Not all Application Performance
Problems come from MySQL
Not all Application Performance
Problems which come from MySQL
• … are resolved on MySQL level
7
www.percona.com
8. Putting it in Practice
Look at Complete System
• Start with Architecture
Do not focus on tuning
database alone
8
www.percona.com
11. What do we need from it ?
To
Handle
Our
Queries
11
•Quickly
•Efficiently
•Reliably
www.percona.com
12. Are those Right Queries ?
One of Architecture Questions
Changing how Application Logic
translates to Queries is a great
optimization
12
www.percona.com
13. Putting It in Practice
Look at Application Transactions
See what Queries they Use
Check out how those queries perform
13
www.percona.com
14. Things to Consider
Look
beyond
averages
Make sure
to look at
trends over
time
14
• But avoid focus on
extreme outliers
• Daily and Weekly cycle
• Growth of load and
Data Size
www.percona.com
24. Process Support
Discover New Queries in the Application
Mark them as “Needing Attention” or “Reviewed”
Tag queries with information about application or
user facing function
Discuss it with the team and record changes
using Comments
24
www.percona.com
25. Query Performance always
shows it
Workload Changes
Data Size
Changing Query Plans
Upgrading MySQL Version
Changing MySQL Settings
Hardware Changes
25
www.percona.com
27. Practical Metrics
How many rows are being scanned vs Sent ?
How much IO are we doing ?
Is there avoidable overhead ?
• Filesorts ?
• TMP Tables ? On Disk ?
27
www.percona.com
28. Areas of Improvement
Architecture
Hardware http://bit.ly/1dRNtaa
Schema and Queries http://bit.ly/1l1KBLN
MySQL version (and Variant)
MySQL Configuration http://bit.ly/1ctWAN9
28
www.percona.com
29. Advanced Registration Rate Ends March 2nd, 2014
Special Discount for Webinar Attendees:
Use Code PeterZ15 to receive 15% off of standard
rates (new registrations only)
http://bit.ly/MySQLUC2014
29
www.percona.com
30. How Percona Can Help
Support
RemoteDBA
Consulting
30
www.percona.com