Database Reference
In-Depth Information
"customer_id" : [
[
1,
1
]
]
}
}
However, the same query can use the compound query as well, so the
single
customer_id
index is now redundant and can be dropped:
> db.metrics.dropIndex("customer_id_1");
{ "nIndexesWas" : 4, "ok" : 1 }
> db.metrics.find({customer_id:1}).explain()
{
"
cursor" : "BtreeCursor customer_id_1_ts_1",
"isMultiKey" : false,
"n" : 1,
"nscannedObjects" : 1,
"nscanned" : 1,
"nscannedObjectsAllPlans" : 1,
"nscannedAllPlans" : 1,
"scanAndOrder" : false,
"indexOnly" : false,
"nYields" : 0,
"nChunkSkips" : 0,
"millis" : 0,
"
indexBounds" : {
"customer_id" : [
[
1,
1
]
],
"ts" : [