db.user_event_collection.find({
$query:{},
$orderby:{created_at:-1},
$limit: 1,
$explain: true
});
{ "cursor" : "BtreeCursor created_at_1 reverse", "isMultiKey" : false, "n" : 14723972, "nscannedObjects" : 14723972,
"nscanned" : 14723972,
"nscannedObjectsAllPlans" : 14723972, "nscannedAllPlans" : 14723972, "scanAndOrder" : false, "indexOnly" : false, "nYields" : 10, "nChunkSkips" : 0, "millis" : 5411, "indexBounds" : { "created_at" : [ [ { "$maxElement" : 1 }, { "$minElement" : 1 } ] ] }, "allPlans" : [ { "cursor" : "BtreeCursor created_at_1 reverse", "n" : 14723972, "nscannedObjects" : 14723972, "nscanned" : 14723972, "indexBounds" : { "created_at" : [ [ { "$maxElement" : 1 }, { "$minElement" : 1 } ] ] } } ], "oldPlan" : { "cursor" : "BtreeCursor created_at_1 reverse", "indexBounds" : { "created_at" : [ [ { "$maxElement" : 1 }, { "$minElement" : 1 } ] ] } }, "server" : "devel.local:27017" }
Правда вопрос уже потерял актуальность давно
Надо же, уже 11 лет прошло, как я спрашивал )