Principles of creating indexes

1 often appear in the fields behind the keywords order by, group by, distinct, build index
2 in the result set field of union and other set operations, build index
3 often used as a query condition field, build index
4 often used as a table join Field, build index
5 If the table data is rarely updated, and several fields that are frequently queried, build
a table with a large number of update operations. Do not operate 3 indexes, no more than 5 at most
7 Do not use a large number of the same value 8. Delete indexes
that are no longer used or seldom used
9. Composite indexes, build indexes according to the frequency of fields appearing in query conditions, and place high-frequency ones at the top
10. Avoid growing in one direction field, indexed (date type)

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327089948&siteId=291194637