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

There is no explanation of how queries against views are implemented

      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.

            Assignee:
            jason.price@mongodb.com Jason Price
            Reporter:
            william.byrne@mongodb.com William Byrne III
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              2 years, 25 weeks, 4 days ago