We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94e5213 commit d5193e9Copy full SHA for d5193e9
source/reference/operator/query/in.txt
@@ -27,6 +27,16 @@ $in
27
at least one element that matches a value in the specified array
28
(for example, ``<value1>``, ``<value2>``, and so on).
29
30
+ The :query:`$in` operator compares each parameter to each document
31
+ in the collection, which can lead to performance issues.
32
+ To improve performance:
33
+
34
+ * It is recommended that you limit the number of parameters passed to the
35
+ :query:`$in` operator to tens of values. Using hundreds of parameters
36
+ or more can negatively impact query performance.
37
38
+ * Create an index on the ``field`` you want to query.
39
40
.. note::
41
42
This document describes the :query:`$in` query operator.
0 commit comments