-
Type: Bug
-
Resolution: Gone away
-
Priority: Minor - P4
-
None
-
Affects Version/s: 4.0.17
-
Component/s: None
-
Query Optimization
-
ALL
-
Both find and aggregate will perform a scan when the search criteria is {$in: [ ]} and the searched field is not indexed.
IMHO the query should either immediately return zero documents or throw an error due to the empty array.
- is fixed by
-
SERVER-70477 Optimizing expressions that are tautologically constant (e.g., `True` or `False`)
- Closed
- is related to
-
SERVER-3337 $all with an empty array should return all documents rather than no documents
- Closed