EXPLAIN was created by and for the MySQL developers, and then offered to the rest of the world with little information on how to interpret it. Simple queries are easy to understand, but queries with filesorts, subqueries, and UNIONs become dizzyingly complicated to unravel. There are a lot of undocumented rules about how EXPLAIN shows its output, too.
I learned EXPLAIN by studying source code, documentation, and learning from the query optimizer team. I verified everything I learned with complex test cases. Along the way I discovered how to reverse-engineer EXPLAIN into a query execution plan. Finally, I wrote a program to do this, the first of its kind.
In this session I’ll teach EXPLAIN from the ground up:
I will (briefly!) demonstrate the visual explain tool I wrote, but I’ll focus on understanding EXPLAIN without tools. This session will give you a deeper understanding of what your queries are really doing.
Baron is a co-author of High Performance MySQL 2nd edition, and creator of innotop and Maatkit (formerly called MySQL Toolkit). He blogs frequently under his online alias Xaprb. Formerly with The Rimm-Kaufman Group, Baron now works for Percona, a consulting firm that helps customers build high-performance applications with MySQL.
For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at scordesse@oreilly.com.
Download the MySQL Sponsor/Exhibitor Prospectus
Download the Media & Promotional Partner Brochure (PDF) for more information on trade opportunities with O'Reilly conferences, or contact mediapartners@oreilly.com.
For media-related inquiries, contact confpr@oreilly.com.
To stay abreast of conference news and to receive email notification when registration opens, please sign up for the MySQL Conference newsletter.
View a complete list of MySQL contacts.