Weitere ähnliche Inhalte Mehr von Jaime Crespo (12) Kürzlich hochgeladen (20) Teaser For the Percona Live London 2014 Tutorial: "Query Optimization with MySQL 5.7 and MariaDB 10: even newer tricks" by DBAHire.com1. DBAHire.com
Query
Optimization
With
MySQL
5.7
and
MariaDB
10:
Even
Newer
Tricks
Query Optimization With MySQL 5.7
and MariaDB 10: Even Newer Tricks
©
2014
DBAHIRE.COM
Percona Live London 2014
dbahire.com/pluk14
1
2. Query
Optimization
With
MySQL
5.7
and
MariaDB
10:
Even
Newer
Tricks
©
2014
DBAHIRE.COM
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
3. Query
Optimization
With
MySQL
5.7
and
MariaDB
10:
Even
Newer
Tricks
Query Optimization With MySQL 5.7 and MariaDB 10:
Even Newer Tricks
INTRODUCTION
©
2014
DBAHIRE.COM
3
4. Query
Optimization
With
MySQL
5.7
and
MariaDB
10:
Even
Newer
Tricks
This is Me Fighting Bad Query Performance
©
2014
DBAHIRE.COM
• MySQL Consultant at
DBAHire.com
• Used to work for Oracle
(MySQL), Percona
• Loves MySQL query
optimization and HA
4
5. 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
6. Query
Optimization
With
MySQL
5.7
and
MariaDB
10:
Even
Newer
Tricks
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
©
2014
DBAHIRE.COM
• 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
7. Query
Optimization
With
MySQL
5.7
and
MariaDB
10:
Even
Newer
Tricks
I Already Mentioned Some of Those Topics
©
2014
DBAHIRE.COM
One Year Ago
• Check my presentation here:
http://www.slideshare.net/jynus/query-optimization56
7
8. 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
9. Query
Optimization
With
MySQL
5.7
and
MariaDB
10:
Even
Newer
Tricks
100+ slides at Percona Live London 2014
©
2014
DBAHIRE.COM
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