From 5dec738d4757aa056f32d2471cf93e376b5f5d30 Mon Sep 17 00:00:00 2001 From: ltran-mdb2 <143426234+ltran-mdb2@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:39:56 -0500 Subject: [PATCH] DOCSP-36128 updating lookup performance (#6139) (#6253) * 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 481672d1ddb..e7fac0b04ce 100644 --- a/source/reference/operator/aggregation/lookup.txt +++ b/source/reference/operator/aggregation/lookup.txt @@ -488,13 +488,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