-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Integration
SERVER-77280 made it possible for queries like
coll.find( { $or: [{ _id: 8 }, { a: 5 }] } })
to produce a query plan that has both a clustered collection scan and index scan for clustered collections. However, we push down a FETCH stage for each index scan node. We should see if there are cases where we can avoid adding a FETCH stage unnecessarily. One idea is to avoid pushing a FETCH when we have count, like:
coll.find( { $or: [{ _id: 8 }, { a: 5 }] } }).count()
- depends on
-
SERVER-77280 $or queries only produce collscan for clustered collections
- Closed