首页 > 代码库 > Mongodb查询提示com.MongoDB.MongoException: too much data for sort() with no index

Mongodb查询提示com.MongoDB.MongoException: too much data for sort() with no index

解决办法:

查询数据量太大,添加索引即可解决问题

通过scrapy爬行完数据后,通过db.wooyun.drops.ensureIndex({"datetime":1})

技术分享

Mongodb查询提示com.MongoDB.MongoException: too much data for sort() with no index