Peter Zaitsev - Practical MySQL Performance Optimization
Upcoming SlideShare
Loading in...5

Peter Zaitsev - Practical MySQL Performance Optimization






Total Views
Slideshare-icon Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Peter Zaitsev - Practical MySQL Performance Optimization Peter Zaitsev - Practical MySQL Performance Optimization Presentation Transcript

    • Practical MySQL Performance Optimization Peter Zaitsev, CEO, Percona Los Angeles MySQL Meetup February, 20, 2014
    • About Presentation Define “Performance” Provide Practical Approach to getting Performance you need Talk about Tools you can use 2
    • 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
    • Speaking about Performance We mean we want system which is 4 •Responsive •Efficient •Scalable
    • Good Enough System needs • Responsiveness to be • Efficiency Good • Scalability Enough in 5
    • 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
    • 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
    • Putting it in Practice Look at Complete System • Start with Architecture Do not focus on tuning database alone 8
    • What Databases Do ? Databases Handle Queries 9
    • Queries ? Selects Inserts Updates Deletes Others 10
    • What do we need from it ? To Handle Our Queries 11 •Quickly •Efficiently •Reliably
    • Are those Right Queries ? One of Architecture Questions Changing how Application Logic translates to Queries is a great optimization 12
    • Putting It in Practice Look at Application Transactions See what Queries they Use Check out how those queries perform 13
    • 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
    • Tools to Consider • pt-query-digest (Percona Toolkit) • MySQL Enterprise Monitor • Performance_Schema (MySQL 5.6+) • Check out ps_helper • Box Anemometer • • Percona Cloud Tools • 15
    • pt-query-digest example 16
    • Top Queries 17
    • Query Details 18
    • More Query Details 19
    • Percona Cloud Tools 20
    • Server Profile 21
    • Query Details 22
    • Graphs! 23
    • 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
    • Query Performance always shows it Workload Changes Data Size Changing Query Plans Upgrading MySQL Version Changing MySQL Settings Hardware Changes 25
    • Efficiency Right Queries Executed Most Efficiently 26
    • 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
    • Areas of Improvement Architecture Hardware Schema and Queries MySQL version (and Variant) MySQL Configuration 28
    • 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) 29
    • How Percona Can Help Support RemoteDBA Consulting 30
    • Thank You! Peter Zaitsev 31