EXPLAIN
EXPLAIN is a SQL statement in the Indexes category. Shows how MySQL executes a query — which indexes are used, table scan vs index scan. The syntax is EXPLAIN [FORMAT=JSON] SELECT ...;. It returns query execution plan. A typical example: EXPLAIN SELECT * FROM employees WHERE last_name = 'Smith'; -- Shows: possible_keys, key (actual index used), rows examined A close relative is CREATE INDEX, which creates an index on one or more columns to speed up query performance. A close relative is DROP INDEX, which removes an existing index from a table. A close relative is COMPOSITE INDEX, which an index on multiple columns. Column order matters — queries use leftmost prefix. More about this category: Database indexes — CREATE INDEX, UNIQUE INDEX, COMPOSITE INDEX, DROP INDEX. Related Indexes entries: CREATE INDEX, DROP INDEX, COMPOSITE INDEX, FULLTEXT INDEX, SPATIAL INDEX, INCLUDE INDEX (Covering Index), PARTIAL INDEX, INVISIBLE INDEX.