[SERVER-12460] Implement fast counting for mongod Created: 23/Jan/14  Updated: 11/Jul/16  Resolved: 29/Jan/14

Status: Closed
Project: Core Server
Component/s: Concurrency, Querying
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Davide Italiano Assignee: hari.khalsa@10gen.com
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux ip-10-237-131-70 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


Attachments: PNG File Screenshot 2014-01-23 11.50.16.png     PNG File Screenshot 2014-01-29 12.09.39.png     File count.js    
Issue Links:
Duplicate
duplicates SERVER-12454 re-implement fast count in new query Closed
Operating System: ALL
Participants:

 Description   

mongo-perf shows counting is slower in 2.6 (wrt 2.4), fast path for counting should be implemented in the new query system.



 Comments   
Comment by Githook User [ 14/Feb/14 ]

Author:

{u'username': u'samantharitter', u'name': u'samantharitter', u'email': u'samantha.ritter@10gen.com'}

Message: SERVER-12460 Relocate fast count code for 2.6, port old tests over for new version.

Signed-off-by: Matt Kangas <matt.kangas@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/de8cdc77791f8145e26dafca6c6499c8c4023f60

Comment by Davide Italiano [ 29/Jan/14 ]

This commit definitely improves the situation – but counting is still a lot slower than 2.4

Comment by Githook User [ 29/Jan/14 ]

Author:

{u'username': u'hkhalsa', u'name': u'Hari Khalsa', u'email': u'hkhalsa@10gen.com'}

Message: SERVER-12460 faster count for simple queries
Branch: master
https://github.com/mongodb/mongo/commit/3b3c25e571852893373ae2e2b361397b260687c9

Comment by Davide Italiano [ 24/Jan/14 ]

Added test case scenario.

2.4.8 output:

connecting to: test
Trial number: 0 250
Trial number: 1 248
Trial number: 2 250
Trial number: 3 270
Trial number: 4 254

master ( f49669ffe3f267bedc258dd17ec1b2d45970ec8a ) output:

connecting to: test
Trial number: 0 310
Trial number: 1 302
Trial number: 2 311
Trial number: 3 293
Trial number: 4 321

Generated at Thu Feb 08 03:28:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.