NOTE
MySQL SQL Parsing
Lexing, parsing, semantic resolution, and the boundary between parsing and optimization.
This is a historical learning note and may contain outdated or incomplete understanding.
Before optimization/execution, MySQL parses SQL into an internal representation: tokens are recognized, syntax is validated, and referenced objects/expressions are resolved according to the server’s processing pipeline.
Parsing answers whether the statement is structurally valid; it does not decide the cheapest access path. Cost-based plan selection belongs to optimization, while actual row access belongs to the executor/storage engine.