The basic use of the index of MongoDB Big Data

The index is to improve query query efficiency of the most effective means.


Creating an index

db.test.createIndex({name: 1, age: 1}, {background: true})

Query Index

db.test.getIndexes()

Delete the specified set of a particular index

db.test.dropIndex(“name_1”)

Delete the specified collection in all index

db.test.dropIndexes()
Published 204 original articles · won praise 59 · Views 140,000 +

Guess you like

Origin blog.csdn.net/baidu_34122324/article/details/102525211