1少用count
db.testcol1.find({xxx:15}).count()
2 避免large-skip
db.testcol1.find({xxx:15}).skip(100000).limit(10)
3 不用not in
本文出自 “dba天空” 博客,请务必保留此出处http://9425473.blog.51cto.com/9415473/1661217
mongodb避免的查询模式
原文:http://9425473.blog.51cto.com/9415473/1661217