MongoDB querying performance for over 5 million records

后端 未结 3 959
礼貌的吻别
礼貌的吻别 2020-12-12 09:22

We\'ve recently hit the >2 Million records for one of our main collections and now we started to suffer for major performance issues on that collection.

They documen

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-12 09:58

    If you are using $in, mongodb never uses INDEX. Change your query, by removing this $in. It should use index and it would give better performance than what you got earlier.

    http://docs.mongodb.org/manual/core/query-optimization/

提交回复
热议问题