[SERVER-12774] "nscanned" not logged anymore for queries Created: 19/Feb/14 Updated: 11/Jul/16 Resolved: 21/Feb/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging, Querying |
| Affects Version/s: | None |
| Fix Version/s: | 2.6.0-rc1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Thomas Rueckstiess | Assignee: | Benety Goh |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | version : "2.5.6-pre-" |
||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 0 | ||||||||||||
| Description |
|
Regular collection scans (without index) don't log the "nscanned" value anymore:
The same query with .explain() logs the "nscanned" value.
The "nscanned" value in the log file is important for performance analysis and should always be logged, like in previous versions. |
| Comments |
| Comment by Githook User [ 26/Feb/14 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |
| Comment by Githook User [ 22/Feb/14 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: REVERT ' | |
| Comment by Githook User [ 21/Feb/14 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |
| Comment by Githook User [ 21/Feb/14 ] | |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | |
| Comment by Benety Goh [ 20/Feb/14 ] | |
|
This seems to be an issue in 2.5.5 as well. Can you confirm? | |
| Comment by Thomas Rueckstiess [ 19/Feb/14 ] | |
|
Update: This only affects 2.5.6-pre- (tested on git hash: 25c2e4b). In 2.5.5 the "nscanned" field was still present. And it also affects indexed queries:
| |
| Comment by Thomas Rueckstiess [ 19/Feb/14 ] | |
|
We used to call it "nscanned" in the log file regardless of indexed or unindexed queries. If we now make a distinction between "nscanned" and "nscannedObjects" that's okay, as long as either one is printed in the query log line. The number is an indication of how much work had to be done, and the ratio between nreturned and nscanned (or nscannedObjects) is an indication on how efficient a query was. The unindexed query with .explain() prints "nscanned" currently. If "nscannedObjects" is introduced, both cases (with and without explain()) need to print that instead. | |
| Comment by Scott Hernandez (Inactive) [ 19/Feb/14 ] | |
|
Thomas, how is the nscanned value import for performance analysis for a query which doesn't use an index? Do you mean that the "nscannedObjects" would be important but is missing (as well)? |