Details
-
Task
-
Status: Closed
-
Major - P3
-
Resolution: Won't Do
-
None
Description
We should consider documenting how statistics are tracked for views in stats counters like Top and the histogram. As of 3.4.0, MongoDB double-counts operations performed on views: once on the view, and once on the underlying collection that the view resolves to. As an example, consider
view1 -> view2 -> view3 -> collection
|
where a -> b indicates that a is a view on b. Then, a query against view1 will have stats counters incremented for both the namespaces view1 and collection.
In terms of counting time, the command's execution time in collection is the time it took to run the fully-transformed view pipeline against collection. The execution time in view1 is the execution time of collection, plus the time spent transforming and processing the original view query.
Original Engineering Ticket Description:
When executing queries on views, they should be counted both on the underlying collection and on the view itself. It is important to see operations on the underlying collection to decide on indexes etc, and it is important to see operations on the view to know where they come from.
Attachments
Issue Links
- documents
-
SERVER-24568 Reflect operations on views in their collStats
-
- Closed
-