mysql add index

1. View execution plan 
explain + execute slow sql
This can see which foreign key of which table needs to be indexed
2. View the index
show index from table name
3, add index
alter table table name add index index_field name (field name)

Guess you like

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