-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
Classic engine uses binary search to check if equalities specified in $in match expression contain given BSON element. Equalities are stored as a vector of deduplicated and sorted BSON elements (see _equalitySet field of InMatchExpression).
SBE uses ArraySet (see corresponding builder) to construct equalities set, ignoring the fact that equalities are deduplicated and sorted.
We should try to experiment with binary search implementation in SBE. This can potentially be beneficial since we do not need to spend time constructing ArraySet and we use the pre-processing of equalities set performed in InMatchExpression.