Skip to content

Commit

Permalink
DOCSP-37741 batchSize note (#7195)
Browse files Browse the repository at this point in the history
* DOCSP-37741 batchSize note

* Adjusts text

* Adjusts text

* Adjusts text
  • Loading branch information
kennethdyer authored Apr 17, 2024
1 parent aa6d0cc commit 6c15361
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/reference/method/cursor.batchSize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 6c15361

Please sign in to comment.