When you run a query, MySQL query optimizer tries to design an optimal execution plan for the query. You can see the plan information by mentioning EXPLAIN before your request.
EXPLAIN is one of the most powerful tools at your disposal to understand and optimize your MySQL queries that are slow or perhaps you have doubts regarding their performance, but unfortunately, many DBAs or developers rarely use them.
In this section, I will show you how to interpret the results of EXPLAIN and how to use it to optimize your queries.