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

XMLWordPrintableJSON

    • Fully Compatible
    • Query 2017-04-17, Query 2017-05-08, Query 2017-05-29, Query 2019-03-11, Query 2019-03-25, Query 2019-04-08
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Anton Korshunov
            Reporter:
            Charlie Swanson
            Votes:
            2 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: