-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Performance
-
None
> db.people.distinct('city',
{state:'NY'}).length
1371
> Date.timeFunc(function(){db.people.distinct('city',
)})
14369
> db.people.find(
).explain().millis
1338
db.people.find(
{state:'NY'}).explain()
{
"cursor" : "BtreeCursor state_1_city_1",
"indexBounds" : [
[
{
"state" : "NY",
"city" :
},
{
"state" : "NY",
"city" :
}
]
],
"nscanned" : 1980644,
"nscannedObjects" : 1980644,
"n" : 1980644,
"millis" : 1365,
"oldPlan" : {
"cursor" : "BtreeCursor state_1_city_1",
"indexBounds" : [
[
{
"state" : "NY",
"city" :
},
{
"state" : "NY",
"city" :
}
]
]
},
"allPlans" : [
{
"cursor" : "BtreeCursor state_1_city_1",
"indexBounds" : [
[
{
"state" : "NY",
"city" :
},
{
"state" : "NY",
"city" :
}
]
]
}
]
}
- depends on
-
SERVER-797 better way to generate clientcursor
- Closed