teaser for the percona live london 2014 tutorial: "query optimization with mysql 5.7 and...
TRANSCRIPT
DBAHire.com
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
© 2014 DBAHIRE.COM
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
Percona Live London 2014 dbahire.com/pluk14
1
© 2014 DBAHIRE.COM
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
Agenda - 3 hours
2
1. Introduction 8. Subquery Optimization
2. Break (VM installation) 9. Fulltext Search
3. General Optimizer Improvements 10. GIS Improvements
4. Computed/Virtual Columns 11. Break
5. Query Rewrite Plugins 12. Query Profiling
6. SQL Mode Changes 13. Results and Conclusions
7. JOIN Optimization 14. Q&A
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
© 2014 DBAHIRE.COM
INTRODUCTION
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
3
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
© 2014 DBAHIRE.COM
This is Me Fighting Bad Query Performance
• MySQL Consultant at DBAHire.com
• Used to work for Oracle (MySQL), Percona
• Loves MySQL query optimization and HA
4
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
© 2014 DBAHIRE.COM
MySQL Versions• Oracle MySQL 5.6 (GA) almost 2 years old • MariaDB 10 over 7 months old • Several lab/alpha releases of MySQL 5.7 and
MariaDB 10.1 with great new features – We will focus only on SQL-related ones – We will not perform formal benchmarks or comparisons
5
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
© 2014 DBAHIRE.COM
New Query Optimization Features• Index Condition Pushdown • Subquery Optimizations
(materialization and semijoin) • IN-to-EXISTS • JOIN-to-WHERE • Multi-Range Read • Batched Key Access • Persistent InnoDB Statistics • EXPLAIN FORMAT=JSON • EXPLAIN INSERT/UPDATE/DELETE • Hash Join • New cost-based optimizer • Optimizer Trace • Filesort with a short LIMIT
• EXISTS-to-IN • EXPLAIN FOR CONNECTION • Faster eq_ref • Extended secondary keys • Histograms • Improved Spatial Indexes (GIS) • Histograms • Virtual columns • PERFORMANCE_SCHEMA
improvements • Forced strict SQL mode; functional
dependencies in GROUP BY • Query rewrite plugin • Configurable optimizer_search_depth
6
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
© 2014 DBAHIRE.COM
I Already Mentioned Some of Those Topics One Year Ago
• Check my presentation here:http://www.slideshare.net/jynus/query-optimization56
7
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
© 2014 DBAHIRE.COM
Example Application
• OSM Database is licensed under the Open DataBase License and is Copyright OpenStreetMap Contributors
8
Query Optimization With MySQL 5.7 and MariaDB 10: Even Newer Tricks
© 2014 DBAHIRE.COM
100+ slides at Percona Live London 2014
You still have time to attend Percona Live London 2014 and my
tutorial on Query Optimization
Go to http://www.percona.com/live/london-2014/ and register for
tutorial day!9