From 0ff88e2d9852dc1625661d580aa38b88c82ee003 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:39:34 -0500 Subject: [PATCH] DOCSP-36128 updating lookup performance (#6139) (#6250) * DOCSP-36128 updating lookup performance * DOCSP-36128 updating lookup performance --- source/reference/operator/aggregation/lookup.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/source/reference/operator/aggregation/lookup.txt b/source/reference/operator/aggregation/lookup.txt index c254e11baaf..b24adaf6864 100644 --- a/source/reference/operator/aggregation/lookup.txt +++ b/source/reference/operator/aggregation/lookup.txt @@ -554,13 +554,9 @@ different ``$lookup`` operations. - .. _uncorrelated-subqueries-performance: - - An index on the foreign collection cannot support uncorrelated - subqueries. - - - To improve performance for uncorrelated subqueries, use generic - indexing strategies and query optimization techniques. For - example, add appropriate indexes to support aggregation stages - before ``$lookup``. + - ``$lookup`` operations that contain uncorrelated subqueries + perform better when the inner pipeline can reference an + index of the foreign collection. - MongoDB only needs to run the ``$lookup`` subquery once before caching the query because there is no relationship between the