Why MySQL Index Improves Query Efficiency
Mysql TutorialThe column introduces why indexes improve query efficiency. However, although the index can speed up the query speed and improve the processing performance of MySQL, but too much The use of indexes will also cause the following disadvantages: It takes time to create and maintain indexes, and this time increases with the increase of data volume. In addition to the data space occupied by the data table, each index also occupies a certain amount of physical space. If you want to build a clustered index, the space required will be even larger. When adding, deleting and modifying the data in the table, the index should also be maintained dynamically, which reduces the speed of data maintenance. Note: Indexes can speed up queries in some cases, but in some cases, they will reduce efficiency. Indexing is only one factor to improve efficiency, so the following principles should be followed when building an index: Create an index on the column that needs to be searched frequently, Can speed up the search. Create an index on the column as the primary key, enforce the uniqueness of the column, and organize the arrangement structure of the data in the table. Create indexes on…