-
Type: Bug
-
Resolution: Cannot Reproduce
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.1.4
-
Component/s: Index Maintenance
-
None
-
Environment:unix
I had a collection that had two indexes, one ascending, and one descending
mongo> db.url.getIndexes()
{
"_id" : ObjectId("4b1651417fc9cc6b089203f6"),
"ns" : "scan_stats.url",
"key" :
,
"name" : "hours_velocity_1",
"unique" : false
},
{
"ns" : "scan_stats.url",
"key" :
,
"name" : "hours.velocity_-1"
}
This query was taking 6 seconds:
Tue Dec 15 01:37:14 query scan_stats.url ntoreturn:1 reslen:224 nscanned:9236896 { hours.velocity:
{ $gt: 0.0 } } nreturned:1 6934
I removed the unnecessary index (the ascending one), and then the query became instantaneous.