admin: use {$ne:null} instead of {$exists:true} for listing contributors

in admin. Who knew $exists had such poor performance!
https://groups.google.com/forum/#!topic/mongodb-user/FKJWoi3lb9I
@sabrecat @wc8, admin page should be snappier now
This commit is contained in:
Tyler Renelle 2014-01-05 16:17:26 -07:00
parent 6c6f364499
commit eda79a73df

View file

@ -23,7 +23,7 @@ api.getMember = function(req, res) {
}
api.listMembers = function(req, res) {
User.find({'contributor.level':{$exists:true}})
User.find({'contributor.level':{$ne:null}})// {$exists:true} causes terrible performance http://goo.gl/GCxzC9
.select('contributor balance profile.name')
.sort('contributor.text')
.exec(function(err, users){