-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Optimization
-
Fully Compatible
-
ALL
-
v8.0
-
(copied to CRM)
-
None
-
3
-
TBD
-
None
-
None
-
None
-
None
-
None
-
None
SERVER-81863 forgot to also consider cases where alwaysFalse is nested within elemMatch. As a result of that, and in combination with SERVER-70477, we caused a regression identified in HELP-75546 where a query like {$elemeMatch: {$in: []}} is now translated to {$elemMatch: {$alwaysFalse: 1}} and thus requires COLLSCAN since neither index bounds can be applied nor an EOF plan is considered.
Unfortunately hinting the right index doesn't work either since a full IXSCAN would be required
- is related to
-
SERVER-70477 Optimizing expressions that are tautologically constant (e.g., `True` or `False`)
-
- Closed
-
-
SERVER-81863 Avoid a scan of either IDX or a collection if the filter is $alwaysFalse:
-
- Closed
-