Details
-
Improvement
-
Status: Closed
-
Major - P3
-
Resolution: Duplicate
-
1.6.5
-
None
-
None
-
Any
Description
Using the test script below this script reports about 50ms of time taken for the count query in the script. This is way too slow for a query that the query optimizer should resolve to a direct bsearch on the index, or so I assume.
use test
db.values.drop();
db.values.ensureIndex(
);
for (var i = 1; i <= 100000; i++) db.values.save(
{value : i});
var t1 = new Date().getTime();
db.values.count({value:{$gt:5000}});
var t2 = new Date().getTime();
(t2 - t1);
Attachments
Issue Links
- duplicates
-
SERVER-1752 improve the performance of simple counts
-
- Closed
-
- is related to
-
SERVER-3268 Attempting to count() a date query causes cursor to timeout
-
- Closed
-