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

Optimize empty encrypted range queries in aggregation

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Queryable Encryption
    • None
    • Query Optimization

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: