mysql一般建表都会设置主键索引 然后对唯一性的字段设置唯一索引
但普通索引从来没用过 普通索引是在非唯一性 需要索引的地方用吗 有没有举例说明 是要对大多数的字段 都进行普通索引吗?
巴扎黑2017-04-17 15:58:58
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.
PHP中文网2017-04-17 15:58:58
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!
伊谢尔伦2017-04-17 15:58:58
Generally, a normal index is added to the where condition. Various factors are also considered here