Analyzing queries
EXPLAIN is the SQL statement that provides information for the way MySQL executes the SQL statements. The EXPLAIN statement works with INSERT, UPDATE, REPLACE, DELETE, and SELECT statements. The output of the EXPLAIN statement is a row of information for each table mentioned or used in the SELECT statement. The output lists the tables in the order of MySQL's reading these tables while executing the statement. All joins are resolved using the nested-loop join method. In the nested-loop join method, MySQL reads a row from the first table in the list and then finds the matching row in the second table in the list, then the third table, and so on. Once all the tables in the list are processed, MySQL processes the results of ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access