Creating an index depends on which fields you want to query. The primary key is indexed by default. For other fields, if you want to query, you also need to create an index. Of course, you don't need to create an index. The purpose of the index is to increase the query speed, but it will increase the size of the database. This is true not only for mysql, but also for other databases.
Creating an index depends on which fields you want to query. The primary key is indexed by default. For other fields, if you want to query, you also need to create an index. Of course, you don't need to create an index. The purpose of the index is to increase the query speed, but it will increase the size of the database. This is true not only for mysql, but also for other databases.
If there is a field that is frequently queried, and it is not a primary key or an index, add a normal index to increase query efficiency!
Generally, a normal index is added to the where condition. Various factors are also considered here