Skip to content

Commit 81b519e

Browse files
authored
DOCS-16614 lookup performance fix (#6080) (#6101)
* 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 0d853d5 commit 81b519e

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
@@ -475,11 +475,14 @@ different ``$lookup`` operations.
475475
- .. _equality-match-performance:
476476

477477
- ``$lookup`` operations that perform equality matches with a
478-
single join typically perform better when the source collection
479-
contains an index on the ``localField``.
478+
single join perform better when the foreign collection contains
479+
an index on the ``foreignField``.
480480

481-
- An index on the ``foreignField`` in the foreign collection
482-
cannot support an equality match with a single join.
481+
.. important::
482+
483+
If a supporting index on the ``foreignField`` does not
484+
exist, a ``$lookup`` operation that performs an equality
485+
match with a single join will likely have poor performance.
483486

484487
* - :ref:`Uncorrelated Subqueries <lookup-uncorrelated-subquery>`
485488

@@ -505,10 +508,7 @@ different ``$lookup`` operations.
505508
- .. _correlated-subqueries-performance:
506509

507510
- ``$lookup`` operations that contain correlated subqueries
508-
typically perform better when the following conditions apply:
509-
510-
- The source collection contains an index on the
511-
``localField``.
511+
perform better when the following conditions apply:
512512

513513
- The foreign collection contains an index on the
514514
``foreignField``.

0 commit comments

Comments
 (0)