-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently when planning, if the first predicate is eligible for an express execution (e.g. have an equality predicate on unique index or have a limit 1), we immediately stop the planning, select the index that is used for the equality predicate and run the query.
While this works perfectly for find queries, it might cause a slow-down for an SBE-eligible pipeline that has a $lookup.
In this ticket we should run some tests to see if there are conditions where SBE beats EXPRESS_IXSCAN + Classic $lookup and if so, support this case.
See repro_find_one_lookup_express_vs_sbe.js
for additional context