Optimiser is the brain of the RDBMS. Optimiser decides the right access method , algorithms , join order and right index to be used for better execution of the query. This blog is made to shed some lights on Cost based optimiser in MySQL 5.7. The cost or statistics are stored in the data dictionary .
What is cost-based optimization ?
- The cost model is based on estimates of cost various operations occur during query execution.
- The optimizer has a set of default “cost constants” it will make decision on execution plans.
- In MySQL 5.7, the optimizer has addition a database of cost estimates to use during the execution plan.
- These cost estimates are stored in server_cost & engine_cost tables in MySQL schema. For more details Cost Model
MySQL …
[Read more]