Skip to content

Commit 1be53e5

Browse files
authored
DOCS-16614 lookup performance fix (#6080)
* 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 657d001 commit 1be53e5

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
@@ -544,11 +544,14 @@ different ``$lookup`` operations.
544544
- .. _equality-match-performance:
545545

546546
- ``$lookup`` operations that perform equality matches with a
547-
single join typically perform better when the source collection
548-
contains an index on the ``localField``.
547+
single join perform better when the foreign collection contains
548+
an index on the ``foreignField``.
549549

550-
- An index on the ``foreignField`` in the foreign collection
551-
cannot support an equality match with a single join.
550+
.. important::
551+
552+
If a supporting index on the ``foreignField`` does not
553+
exist, a ``$lookup`` operation that performs an equality
554+
match with a single join will likely have poor performance.
552555

553556
* - :ref:`Uncorrelated Subqueries <lookup-uncorrelated-subquery>`
554557

@@ -574,10 +577,7 @@ different ``$lookup`` operations.
574577
- .. _correlated-subqueries-performance:
575578

576579
- ``$lookup`` operations that contain correlated subqueries
577-
typically perform better when the following conditions apply:
578-
579-
- The source collection contains an index on the
580-
``localField``.
580+
perform better when the following conditions apply:
581581

582582
- The foreign collection contains an index on the
583583
``foreignField``.

0 commit comments

Comments
 (0)