[SERVER-3444] Alter profiler to capture nscanned when doing counts Created: 18/Jul/11  Updated: 06/Dec/22  Resolved: 24/Jan/17

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Kenny Gorman Assignee: Backlog - Query Team (Inactive)
Resolution: Duplicate Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-17862 Unify stats reporting for log/profile... Closed
duplicates SERVER-23257 Report keysExamined/docsExamined/hasS... Closed
Assigned Teams:
Query
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Alter the profiler to capture nscanned for count() just like it would if it was a straight query.

in 1.8.1:

{ "ts" : ISODate("2011-07-18T22:32:47.256Z"), "info" : "query platform_addressbook.$cmd ntoreturn:1 command: { count: \"contact\", query:

{ userId: \"000044607693\", groups: \"test-group\" }

} reslen:64 30ms", "millis" : 30 }

Would like it to be:
{ "ts" : ISODate("2011-07-18T22:32:47.256Z"), "info" : "query platform_addressbook.$cmd reslen:2082 nscanned:292026 ntoreturn:1 command: { count: \"contact\", query:

{ userId: \"000044607693\", groups: \"test-group\" }

} reslen:64 30ms", "millis" : 30 }



 Comments   
Comment by James Wahlin [ 24/Jan/17 ]

We added "keysExamined" and "docsExamined" statistics to the profiler and slow diagnostic logging under SERVER-17862 and it is available in MongoDB 3.4. Closing as a duplicate.

Comment by David Storch [ 24/Jan/17 ]

james.wahlin, was this implemented in 3.4 as part of your work for SERVER-17862? If so, please close as a duplicate.

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