2.5-pre nightly show 30% performance query degradation when comparing to 2.4.8 in some scenario
Test setup
- the single collection has 1040162 doc
- each doc is of size 1264, and have two field "_id" and "name" of type NumberLong with identical value. Both fields are indexed.
- run query find({ "_id": randInt()).one() vs find(
{"name": randInt() }
).one()
Version | query with "_id" | query with "name" |
---|---|---|
2.4.8 ops/s | 14549 | 13510.6 |
2.4.8 CPU | 29% | 49% |
2.5-pre (2013-11-13) ops/s | 14319.4 | 10793.4 |
2.5-pre CPU | 60% | 85% |
query explain show following difference
- 2.5-pre show "nscannedObjectsAllPlans" : & "nscannedAllPlans" as 2, and 2.4.8 show them as 1
test is done with Ec2 m1.xlarge instance, and can be reproduced consistently