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

后端 未结 4 1349
时光取名叫无心
时光取名叫无心 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 01:16

    Try adding {community_id: 1, 'updated_at.t': -1} index. It needs to search by community_id first and then sort.

提交回复
热议问题