Skip to content

Instantly share code, notes, and snippets.

@danared
Created October 26, 2015 21:16
Show Gist options
  • Select an option

  • Save danared/0bb3994aa8d42172fba2 to your computer and use it in GitHub Desktop.

Select an option

Save danared/0bb3994aa8d42172fba2 to your computer and use it in GitHub Desktop.
$./mongo
>use marketdata
>db.system.profile.find({op:"query", ns:"marketdata.minbars"}).sort({ts:-1}).limit(1).pretty()
{
"op" : "query",
"ns" : "marketdata.minbars",
"query" : {
"Timestamp" : {
"$gte" : "2010-07-01",
"$lt" : "2010-08-01"
}
},
...
"inputStage" : {
"stage" : "IXSCAN",
"nReturned" : NumberInt(101),
"executionTimeMillisEstimate" : NumberInt(0), //rounded to 0 ms...
...
"keyPattern" : {
"Timestamp" : NumberInt(1)
},
"indexName" : "Timestamp_1",
"isMultiKey" : false,
"direction" : "forward",
"indexBounds" : {
"Timestamp" : [
"[\"2010-07-01\", \"2010-08-01\")"
]
},
"keysExamined" : NumberInt(101),
}
}
},
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment