The current map/reduce implementation for a simple count query (introduced by
) is unnecessarily slow. As it stands, only a simple count() over a collection with a simple filter and without GROUP BY is supported, so I propose to use the count() method available in the MongoDB Java driver.
Patch will follow shortly.
(NB: For count queries with GROUP BY clauses and other aggregates, map-reduce may still be required as suggested in NUCMONGODB-71