Skip to content

Commit 82220b9

Browse files
authored
DOCS-16614 lookup performance fix (#6080) (#6098)
* DOCS-16614 lookup performance fix: * DOCS-16614 lookup performance fix * DOCS-16614 adding note about source collection * DOCS-16614 adding note about source collection * DOCS-16614 adding admonotion * DOCS-16614 adding admonotion * DOCS-16614 typo * DOCS-16614 fixing format * DOCS-16614 fixing format * DOCS-16614 copy edits * DOCS-16614 copy edits * DOCS-16614 copy edits * DOCS-16614 tech edit * DOCS-16614 tech edit
1 parent 2eea619 commit 82220b9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

source/reference/operator/aggregation/lookup.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -541,11 +541,14 @@ different ``$lookup`` operations.
541541
- .. _equality-match-performance:
542542

543543
- ``$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``.
546546

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.
549552

550553
* - :ref:`Uncorrelated Subqueries <lookup-uncorrelated-subquery>`
551554

@@ -571,10 +574,7 @@ different ``$lookup`` operations.
571574
- .. _correlated-subqueries-performance:
572575

573576
- ``$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:
578578

579579
- The foreign collection contains an index on the
580580
``foreignField``.

0 commit comments

Comments
 (0)