Slow database queries on users collection


I had some database issues today and one of the queries causing issues was this:

2016-12-14T06:25:31.545+0000 [conn38304296] query wc_draft.users query: { $or: [ { services.password.reset.when: { $lt: new Date(1481437530467) } }, { services.password.reset.when: { $lt: 1481437530467.0 } } ] } planSummary: COLLSCAN ntoreturn:1000 ntoskip:0 nscanned:100000 nscannedObjects:100000 keyUpdates:0 numYields:142 locks(micros) r:1981292 nreturned:0 reslen:20 1072ms

I’m not sure where this is happening exactly or why it’s happening. I assume it’s something that Meteor does, and is locking my database for 2 seconds (1981292 microseconds).

I assume I can create an index for services.password.reset.when to solve this. Anyone else had this issue before?