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

There is no explanation of how queries against views are implemented

    XMLWordPrintable

    Details

    • Last comment by Customer:
      true
    • Story Points:
      3
    • Sprint:
      ServerDocs2021: Oct26 - Nov2, ServerDocs2021: Nov2 - Nov9

      Description

      Our documentation for views says only

      Views are computed on demand during read operations, and MongoDB executes read operations on views as part of the underlying aggregation pipeline.

      (in a section titled View Creation).

      While that is all correct, more detail is needed. I suggest something like:

      What happens when you run a query against a view is:

      • the query filter, projection, sort, skip, limit etc parts of the find command are converted to their equivalent aggregation stages.
      • those stages are added to the end of the aggregation pipeline in the view definition.
      • Aggregation Pipeline Optimization then reorders and/or coalesces stages where doing so will give a performance benefit while not changing the results.

      (and it would probably be appropriate under the heading for Behaviour on the same page.

        Attachments

          Activity

            People

            Assignee:
            jason.price Jason Price
            Reporter:
            william.byrne William Byrne III
            Participants:
            Last commenter:
            Jason Price Jason Price
            External Reviewer:
            William Byrne III
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              10 weeks, 4 days ago
              Date of 1st Reply: