From 6c153616b6a023baa2274a82b09dd750cf986453 Mon Sep 17 00:00:00 2001 From: "Kenneth P. J. Dyer" <93145796+kennethdyer@users.noreply.github.com> Date: Wed, 17 Apr 2024 18:18:34 -0500 Subject: [PATCH] DOCSP-37741 batchSize note (#7195) * DOCSP-37741 batchSize note * Adjusts text * Adjusts text * Adjusts text --- source/reference/method/cursor.batchSize.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/reference/method/cursor.batchSize.txt b/source/reference/method/cursor.batchSize.txt index 3261137af30..8cea5216ab0 100644 --- a/source/reference/method/cursor.batchSize.txt +++ b/source/reference/method/cursor.batchSize.txt @@ -26,6 +26,18 @@ Definition most :driver:`drivers ` return results as if MongoDB returned a single batch. + .. note:: + + If the batch size is too large, the cursor allocates more + resources than it requires, which can negatively impact + query performance. If the batch size is too small, the + cursor requires more network round trips to retrieve the + query results, which can negatively impact query + performance. + + Adjust ``batchSize`` to a value appropriate to your + database, load, and application needs. + The :method:`~cursor.batchSize()` method takes the following field: