Details
-
Improvement
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
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
Issue Links
- duplicates
-
SERVER-70969 Generate a single payload for non-overlapping ranges
-
- Closed
-