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

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

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.4.0
    • Component/s: None
    • Labels:

      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

            Activity

              People

              Assignee:
              kay.kim Kay Kim (Inactive)
              Reporter:
              emily.hall Emily Hall
              Participants:
              Last commenter:
              Jonathan Dahl Jonathan Dahl
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Days since reply:
                4 years, 46 weeks, 5 days ago