MySQL query plan
1: Client initiates query request
2: After the server receives the request, queries the cache first if the cache hits, returns the data directly to the client otherwise, resolves the SQL
After the 3:sql parsing is complete, the preprocessing
4: There is a query optimizer survival query plan
5: Call the storage engine through the API interface to go to disk to access the data that needs to be queried, and then return to the client through the query execution engine
It is worth mentioning that: the MySQL client communicates with the server, using half-duplex communication, that is, always only one party is sending the data.
After the client sends the request, it can only wait for the server to return the data, this protocol makes MySQL communication simple and fast, but also restricts the traffic packet, the client cannot
Chunked send requests, and the data returned by the service side, the large amount of data is usually returned to the client by dividing into multiple small packets, and the client should also be aware of receiving the complete packet, not the breakpoint
The receiving part, resulting in the loss of data.
MySQL query plan