Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9448

Consider documenting how statistics for views are tracked in top/histogram



    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Won't Do
    • None
    • 3.4.0
    • Server


      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.


        Issue Links



              kay.kim@mongodb.com Kay Kim (Inactive)
              emily.hall Emily Hall
              Sarah Olson Sarah Olson
              0 Vote for this issue
              2 Start watching this issue


                9 weeks, 3 days ago