A list of indices in MongoDB?

前端 未结 6 949
离开以前
离开以前 2020-12-07 23:57

Is there a way to see a list of indices on a collection in mongodb in shell? i read through http://www.mongodb.org/display/DOCS/Indexes but i dont see anything

6条回答
  •  北海茫月
    2020-12-08 00:19

    And if you want to get list of all indexes in your database:

    use "yourdbname"
    
    db.system.indexes.find()
    

提交回复
热议问题