Common optimization schemes for mysql

1. Index optimization

1. Use indexes reasonably. Add indexes to fields that are frequently queried but not frequently added, deleted, or modified. The number of indexes on a table should not exceed 6.

2. The field should be used directly after Order by and group by, and the field should be an index field.

3. The length of the index field should be short and fixed.

4. The index field cannot be repeated too much.

2. Table structure optimization

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325818519&siteId=291194637