Execution steps of mysql query statement@1

The first step is to establish a connection. Connect, obtain permissions, and manage connections.
The second step is to query the cache. For libraries that are frequently written, the query cache will be invalidated frequently, so it is not recommended to enable the query cache.
The third step is the analyzer. If it misses the cache, enter the parser to analyze the sentence. This step includes this method analysis and syntax analysis.
The fourth step is the optimizer. Select the index, determine the order of table association, etc. The
fifth step, the actuator. Verify execution permissions (the query cache is in the query cache stage and also performs permission verification), the query statement will also verify the permissions before the optimizer step.
We often encounter "the column field does not exist" syntax errors, obviously Thrown by the parser processing step executed by the actual statement.

Guess you like

Origin blog.csdn.net/feifeixiongxiong/article/details/113102711