This query takes a lot of time. It's used during project registration to enforce a max number of projects, but it scans every single project to do its counting. https://groups.google.com/d/msg/mongodb-user/8aFNkJbtDF0/TILIz_Mp8tQJ It's not necessary to do this query when the nbhd has no max limit.
"query" : {
"count" : "project",
"fields" : null,
"query" : {
"deleted" : false,
"is_nbhd_project" : false,
"neighborhood_id" : ObjectId("4be2faf8898e33156f00003e")
}
},
allura:db/5091
Tests in allura/tests/functional/test_neighborhood.py should cover it