MySQL 8.0.29
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: