Unreasonably slow MongoDB query, even though the query is simple and aligned to indexes

后端 未结 3 698
迷失自我
迷失自我 2021-02-04 10:50

I\'m running a MongoDB server (that\'s literally all it has running). The server has 64gb of RAM and 16 cores, plus 2TB of hard drive space to work with.

The Doc

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-04 11:18

    Have you tried adding _id to your composite index. As you're using it as part of the query won't it still have to do a full table scan?

提交回复
热议问题