> db.dropDatabase()
{ "dropped": "test", "ok": 1 }
test[13:4:8]> db.foo.insert({a:1})
Inserted 1 record(s) in 1057ms
test[13:4:14]> db.system.indexes.find()
{ "v": 1, "key": { "_id": 1 }, "ns": "test.foo", "name": "_id_" }
Fetched 1 record(s) in 1ms
test[13:4:21]> db.foo.find({a:1}).explain()
{
"cursor": "BasicCursor",
"isMultiKey": false,
"n": 1,
"nscannedObjects": 1,
"nscanned": 1,
"nscannedObjectsAllPlans": 1,
"nscannedAllPlans": 1,
"scanAndOrder": false,
"indexOnly": false,
"nYields": 0,
"nChunkSkips": 0,
"millis": 0,
"indexBounds": {
},
"server": "ubuntu:54321"
}
test[13:4:27]> db.randomNS.system.indexes.insert({ns:"test.foo", key:{a:1}, name:"a_1"});
Inserted 1 record(s) in 1ms
test[13:4:41]> db.system.indexes.find()
{ "v": 1, "key": { "_id": 1 }, "ns": "test.foo", "name": "_id_" }
Fetched 1 record(s) in 1ms
test[13:4:55]> db.randomNS.system.indexes.find()
{ "v": 1, "key": { "a": 1 }, "ns": "test.foo", "name": "a_1" }
Fetched 1 record(s) in 1ms
test[13:5:3]> db.system.namespaces.find()
{ "name": "test.system.indexes" }
{ "name": "test.foo.$_id_" }
{ "name": "test.foo" }
{ "name": "test.randonNS.system.indexes" }
{ "name": "test.foo.$a_1" }
Fetched 5 record(s) in 1ms
test[13:5:10]> db.foo.find({a:1}).explain()
{
"cursor": "BtreeCursor a_1",
"isMultiKey": false,
"n": 1,
"nscannedObjects": 1,
"nscanned": 1,
"nscannedObjectsAllPlans": 1,
"nscannedAllPlans": 1,
"scanAndOrder": false,
"indexOnly": false,
"nYields": 0,
"nChunkSkips": 0,
"millis": 0,
"indexBounds": {
"a": [
[
1,
1
]
]
},
"server": "ubuntu:54321"
}