删除索引

mongo shell

db.gameShortLink.dropIndex({gameShortLink:1})

举例:

mongo_drop_index

MongoDB Compass

MongoDB Compass:

点击索引右边的 垃圾箱的按钮

compass_index_trash_icon

默认_id的index无法删除

Indexes中,默认有个_idindex,是系统自带的,无法删除 -> 所以后面没有垃圾桶按钮 -> 是正常现象。

举例:

一共5个索引:

去删除2个:

compass_drop_index_first

compass_drop_index_2nd

还剩3个:

compass_remain_three_index

results matching ""

    No results matching ""