Skip to content

Commit 14fe6b7

Browse files
author
giveturtle
committed
Added comment about $all's inefficiency
See issue https://jira.mongodb.org/browse/SERVER-1000
1 parent b04b674 commit 14fe6b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/reference/operator/all.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ $all
5353

5454
In most cases, MongoDB does not treat arrays as sets. This
5555
operator provides a notable exception to this approach.
56+
57+
Currently, $all queries scan all the documents that match
58+
the first element in the query array. This means that even with
59+
when the field is indexed, queries may take a very long time
60+
to return (especially when the first element in the array appears
61+
in many documents).
62+
See: https://jira.mongodb.org/browse/SERVER-1000
5663

5764
.. seealso::
5865
:method:`find() <db.collection.find()>`, :method:`update()

0 commit comments

Comments
 (0)