MySQL | Performance Tuning | TO THE NEW Blog
Summary
• Talking about the Query life cycle, it’s first parsed, then planned, executed, and finally sent back to the client. • It involves a lot of calls to the storage engine to retrieve rows and post-retrieval executions such as grouping and sorting. • While accomplishing the above tasks, the query spends time on the network in the CPU on operations such as statistics, locking, and most importantly, calls to the storage engine to retrieve rows. Some interesting facts that are good to knowledge about • MySQL’s design separates query processing and other server tasks from data storage and retrieval. For example, the optimizer asks the storage engine about some of its capabilities and the cost of certain operations, and for statistics on the table data.