ITeye博客

mongdb

共 1 篇文章

mongdb添加索引

1、cd 到mongdb目录 2、bin/mongo 3、use event 4、db.ogg_event_current.ensureIndex({"alertKey":-1}) 5、db.ogg_event_current.ensureIndex({"severity":1}) [root@localhost ~]# cd /opt/mongodb-linux-x86_64-rhel70-3.2.9/ [root@localhost mongodb-linux-x86_64-rhel70-3.2.9]# bin/mongo MongoDB shell version: 3.2.9 con…

2017-11-13 15:46 · mongdb · 索引 · Mongdb