MongoDB Query for records with non-existant field & indexing

前端 未结 2 2042
执笔经年
执笔经年 2021-01-06 07:53

We have a mongo database with around 1M documents, and we want to poll this database using a processed field to find documents which we havent seen before. To do this we are

2条回答
  •  无人及你
    2021-01-06 08:16

    Upgrading to 2.0 is going to do this for you:

    From MongoDB.org:

    Before v2.0, $exists is not able to use an index. Indexes on other fields are still used.

提交回复
热议问题