Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24860

Optimize away entire pipeline if it can be answered using a query

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.10
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 2017-04-17, Query 2017-05-08, Query 2017-05-29, Query 2019-03-11, Query 2019-03-25, Query 2019-04-08
    • Linked BF Score:
      0

      Description

      An aggregation pipeline can be used to represent a query, like the following:

      db.example.aggregate([{$project: {excluded: 0}}, {$match: {predicate: true}}]);
      

      In these cases, it would be more efficient to skip the aggregation layer, and execute the entire computation using a query.

      It is expected that pipelines like the above pipeline will be much more common once non-materialized views are introduced in SERVER-142.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                23 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: