From eda79a73dfa198a3818feaa5a79e9e048cb12629 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 5 Jan 2014 16:17:26 -0700 Subject: [PATCH] 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 --- src/controllers/admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/admin.js b/src/controllers/admin.js index f0c2e7a549..e39c966767 100644 --- a/src/controllers/admin.js +++ b/src/controllers/admin.js @@ -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){