-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Query Optimization
If I understand correctly, on a clustered collection the _id field is the same as the record ID (RID). Does this mean that any secondary index also includes the _id value? For example, an index on {a: 1} is really a set of (a, _id) entries, almost like an index on {a: 1, _id: 1}.
Could we use an {a: 1} index to satisfy queries like {$sort: {a: 1, _id: 1}}?