-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
-
Execution Team 2022-01-10, Execution Team 2022-01-24, Execution Team 2022-02-07, Execution Team 2022-02-21
A range query using an index likeĀ find({a:{$lte:"yadda")}} generates tight bounds:
"indexBounds" : { "a" : [ "[\"\", \"yadda\"]" ]
By contrast, a range query by the cluster key likeĀ find({_id:{$lte:"yadda")}} generates only a single bound:
"winningPlan" : { "stage" : "COLLSCAN", "filter" : { "_id" : { "$lte" : "yadda" } }, "direction" : "forward", "maxRecord" : "yadda" },
This range query can be quite inefficient as it fetches any document of lower data type, like numeric types.