MySQL 8.4.2
Source Code Documentation
SQL Optimizer

The task of query optimizer is to determine the most efficient means for executing queries.

The query optimizer consists of the following sub-modules:

The Optimizer Trace

Additional articles about the query optimizer: