EXPLAIN Statement: The EXPLAIN statement is used in MySQL for query optimization.It helps us understand how a query will be executed — which index is being used, how many rows will be scanned, and whether the query will run efficiently or not.
Syntax:
EXPLAIN SELECT * FROM table_name WHERE condition;
