MongoDB - too much data for sort() with no index error

后端 未结 4 1321
时光取名叫无心
时光取名叫无心 2020-12-30 00:29

I am using MongoDB 1.6.3, to store a big collection (300k+ records). I added a composite index.

db[\'collection_name         


        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-30 00:54

    Having a cursor batch size that is too large will cause this error. Setting the batch size does not limit the amount of data you can process, it just limits how much data is brought back from the database. When you iterate through and hit the batch limit, the process will make another trip to the database.

提交回复
热议问题