Query shapes like {a: { "$in": [1]}, b:1, c: { "$in": [1,2,3]}} and {a: 1, b:1, c: { "$in": [1,2,3]}} are cached separately while they are equivalent.
It may not be a big problem, but mongod could be smart enough to recognize this.
- is duplicated by
-
SERVER-23330 Optimize aggregation on sharded setup if first stage is exact match on shard key with $in
- Closed
- is related to
-
SERVER-27707 findAndModify breaks when I use the query operator "$in" and the update operator "$addToSet" on the same field.
- Closed
-
SERVER-12024 re-implement $in in terms of $or
- Backlog
- related to
-
SERVER-21064 It's possible to fail on sort memory overflow even if there is an alternative plan that requires no sort.
- Closed