This chapter explains how to optimize MySQL performance by using indexes and query execution plans, and provides examples. Optimization involves a good understanding of the MySQL optimizer and index strategy and, finally, a solid knowledge of how indexes and queries work together.
In this chapter, we will cover the following topics:
- How does the MySQL optimizer think in MySQL 8.0?
- What kind of data type should I consider indexing first and why?
- Why should I have a good index strategy?
- What impact does an index have on MySQL performance?
- How to display and analyze a table structure
- How to efficiently read MySQL query execution plans
- How to know when to create an index
- Using multiple columns in an index
- Organizing columns in an index for best performance
- Case study 1 – how to use the explain plan tool in MySQL 8.0
- Case study 2 –...