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

Comment on: "manual/core/aggregation-pipeline-optimization.txt"

    XMLWordPrintableJSON

Details

    Description

      None of these optimizations are real. These are all special cases of other optimizations.

      The last one is odd since if there is a group, it is better not to add the project. The general rule is that if only a subset of fields are needed, agg will figure that out and only use those fields in a way that is more efficient than an explicit $project. You can see what fields it thinks are needed by running an explain. A $project should only be added if agg gets it wrong.

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            mathias@mongodb.com Mathias Stearn
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9 years, 42 weeks, 5 days ago