Skip to content

Instantly share code, notes, and snippets.

@AD7six
Created January 3, 2014 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AD7six/82d32cedd2ba1c70ee85 to your computer and use it in GitHub Desktop.
Save AD7six/82d32cedd2ba1c70ee85 to your computer and use it in GitHub Desktop.
> version()
2.4.4
> db.test.insert({Country:'UK'});
> db.test.insert({Country:'US'});
> db.test.ensureIndex({"Country":1});
> db.test.find({Country:/S/}).explain();
{
"cursor" : "BtreeCursor Country_1 multi",
"isMultiKey" : false,
"n" : 1,
"nscannedObjects" : 1,
"nscanned" : 2,
"nscannedObjectsAllPlans" : 1,
"nscannedAllPlans" : 2,
"scanAndOrder" : false,
"indexOnly" : false,
"nYields" : 0,
"nChunkSkips" : 0,
"millis" : 0,
"indexBounds" : {
"Country" : [
[
"",
{
}
],
[
/S/,
/S/
]
]
},
"server" : "air.local:27017"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment