I run the following query, and it takes an average of 9 seconds to return the results. There are no filters on it, so I'm not sure if the index will help. Why does it work so slow? There are only 250 objects and only 4 fields (all text).
Country.collection.find({},:fields => ['country_name', 'country_code']).to_json
"cursor":"BasicCursor",
"nscanned":247,
"nscannedObjects":247,
"n":247,
"millis":0,
"nYields":0,
"nChunkSkips":0,
"isMultiKey":false,
"indexOnly":false,
"indexBounds":{},
"allPlans":[{"cursor":"BasicCursor","indexBounds":{}}]
The processor, memory and disk on the machine do not even notice the execution of the request. Any help would be greatly appreciated.
source
share