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

Optimize empty encrypted range queries in aggregation

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Queryable Encryption
    • Labels:
      None
    • Query Optimization

      The agg expression:

      {
          $and: [
              {$lte: ["$age", NumberInt(12)]},
              {$gt: ["$age", NumberInt(15)]},
          ]
      }
      

      Currently produces two separate one-sided ranges. This means that lots of work will be done server-side for a query which is known to return no results on the client. Query analysis should optimize this predicate to produce a single encrypted payload that contains no edges.

      Note that this optimization is only valid without arrays.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            davis.haupt@mongodb.com Davis Haupt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: