mongodb避免的查询模式
更新:HHH   时间:2023-1-7


1少用count

db.testcol1.find({xxx:15}).count()

 

2 避免large-skip

db.testcol1.find({xxx:15}).skip(100000).limit(10)

 

3 不用not in

返回MongoDB数据库教程...