How to Analyze and Tune MySQL Queries for Better Performance
Performance of SQL queries plays a big role in application performance. If some queries execute slowly, these queries or the database schema may need tuning. This tutorial covers query processing, optimization methods, and how the MySQL optimizer chooses a specific plan to execute SQL. It demonstrates how to use tools such as EXPLAIN (including Structured and Visual EXPLAIN), Optimizer Trace, and Performance Schema to analyze query plans for different types of SQL queries. Based on the analysis, and using practical examples, the tutorial shows how to take the next steps for performance tuning. It might mean adding optimizer hints to force a particular query plan, changing the schema, or modifying configuration parameters.
Senior Principal Software Engineer, Oracle
Øystein Grøvlen is a Senior Principal Software Engineer in the MySQL group at Oracle, where he works on the MySQL Query Optimizer. Dr. Grøvlen has a PhD in Computer Science from the Norwegian University of Science and Technology. Before joining the MySQL team 9 years ago, he was a contributor on the Apache Derby project and Sun's Architectural Lead on Java DB. Prior to that, he worked for 10 years on the development of Clustra, a highly available DBMS. Øystein lives in Trondheim, Norway.