Details
-
Task
-
Resolution: Fixed
-
Major - P3
-
None
-
None
Description
Description
Downstream Change Summary
The number of tailable and non-tailable collection scans are now reported in the metrics.queryExecutor.collectionScans section of serverStatus output:
MongoDB Enterprise > db.serverStatus().metrics.queryExecutor.collectionScans
|
{ "nonTailable" : NumberLong(0), "total" : NumberLong(0) }
|
These stats can also be retrieved on a per-collection basis using the queryExecStats option to the $collStats aggregation stage:
MongoDB Enterprise > db.c.aggregate([{$collStats: {queryExecStats: {}}}])
|
{ "ns" : "test.c", "host" : "storchbox:27017", "localTime" : ISODate("2020-05-26T19:44:04.850Z"), "queryExecStats" : { "collectionScans" : { "total" : NumberLong(0), "nonTailable" : NumberLong(0) } } }
|
Description of Linked Ticket
It is unclear how prevalent are data scans. Having statistics on collection and index scans would allow us to decided if improvements in this area are critical for the overall performance.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
Attachments
Issue Links
- documents
-
SERVER-40755 Expose statistics which indicate how many collection scans have executed
-
- Closed
-