1少用count
db.testcol1.find({xxx:15}).count()
2 避免large-skip
db.testcol1.find({xxx:15}).skip(100000).limit(10)
3 不用not in
上一篇:mongodb 中shell无法删除问题
下一篇:mongodb评论回复的相关设计