wsyy
asked on
MongoDB question
When I want to sort by multiple keys on mongodb , I got some problem , And can I fix it ??
db.test.a.count()
78150
db.test.a.ensureIndex({a:1 ,b:1,c:1,d :1});
db.test.a.find().sort({a:1 ,b:1,c:1,d :1});
error: { "$err" : "too much data for sort() with no index. add an index or speci fy a smaller limit", "code" : 10128 }
db.test.a.count()
78150
db.test.a.ensureIndex({a:1
db.test.a.find().sort({a:1
error: { "$err" : "too much data for sort() with no index. add an index or speci fy a smaller limit", "code" : 10128 }
ASKER
Hi Gary, sorry for late response. Quite busy recently.
Could you please check the link? Can't access to it.
Could you please check the link? Can't access to it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://craiccomputing.blogspot.com/2011/02/always-index-columns-that-you-want-to.html
Gary