In the MySQL world, EXPLAIN is a keyword used to
gain information about query execution. This blog post will
demonstrate how to utilize MySQL EXPLAIN to remedy
problematic queries.
On the Technical Solutions team here at PlanetScale, we
frequently talk with users who seek advice regarding query
performance. Although creating an EXPLAIN plan is
relatively simple, the output isn’t exactly intuitive. It’s
essential to understand its features and how to leverage it best
to achieve performance goals.
When you prepend the EXPLAIN keyword to the
beginning of a query, it explains how the database executes that
query and the estimated costs. By leveraging this internal MySQL
tool, you can observe the following: …