-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
Given this query:
db.coll.aggregate([ {$sort: {"ts”: 1}}, {$group: { _id: "$meta.a”, ts: {$last: "$ts”}, measureA: {$last: "$measureA"}, measureB: {$last: "$measureB"} }}])
and assuming an index on {meta.a:1, ts:1},
Expand the $sort into the following to trigger the last point optimization:
db.coll.aggregate([ {$sort: {"meta.a":"1, "ts”: 1}}, {$group: { _id: "$meta.a”, ts: {$last: "$ts”}, measureA: {$last: "$measureA"}, measureB: {$last: "$measureB"} }}])
- is depended on by
-
SERVER-61659 TS Last Point opt: final test plan review
- Closed