Case study 2 – how to display and analyze a table structure versus the EXPLAIN plan tool

We will explore the following in this section:

  • Running a plan with EXPLAIN
  • How to display the structure of a table for our execution plan (EXPLAIN)
  • Finally, how to compare the structure of a table with respect to an execution plan (EXPLAIN)

Let's take the example from case study 1 but this time show you a full scan by using the EXPLAIN command to display the structure of the people table as its DESC synonym would:

When we want to optimize a query, we have to examine it with the following steps:

  1. Run the execution plan (EXPLAIN) on the query preceding ...

Get Advanced MySQL 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.