-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Queryable Encryption
-
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.
- duplicates
-
SERVER-70969 Generate a single payload for non-overlapping ranges
- Closed