File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
source/reference/operator/aggregation Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -541,11 +541,14 @@ different ``$lookup`` operations.
541
541
- .. _equality-match-performance:
542
542
543
543
- ``$lookup`` operations that perform equality matches with a
544
- single join typically perform better when the source collection
545
- contains an index on the ``localField ``.
544
+ single join perform better when the foreign collection contains
545
+ an index on the ``foreignField ``.
546
546
547
- - An index on the ``foreignField`` in the foreign collection
548
- cannot support an equality match with a single join.
547
+ .. important::
548
+
549
+ If a supporting index on the ``foreignField`` does not
550
+ exist, a ``$lookup`` operation that performs an equality
551
+ match with a single join will likely have poor performance.
549
552
550
553
* - :ref:`Uncorrelated Subqueries <lookup-uncorrelated-subquery>`
551
554
@@ -571,10 +574,7 @@ different ``$lookup`` operations.
571
574
- .. _correlated-subqueries-performance:
572
575
573
576
- ``$lookup`` operations that contain correlated subqueries
574
- typically perform better when the following conditions apply:
575
-
576
- - The source collection contains an index on the
577
- ``localField``.
577
+ perform better when the following conditions apply:
578
578
579
579
- The foreign collection contains an index on the
580
580
``foreignField``.
You can’t perform that action at this time.
0 commit comments