-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Problem
Find and Aggregation Cursors created by the driver will always have a default batch size of 1000 applied to them without the possibility to just leave out a batch size setting.
This causes a major performance overhead for scripts potentially run inside mongosh compared to the old shell. The old shell relied on the server's default behavior by not specifying any batch size by default. As such the server will return up to 101 results on the initial find() and subsequent getMore() calls will return up to 16MB of data.
Current batching of at most 1000 entries by default requires a lot more network round trips to get the same amount of documents (depending on document size) but the incurred latency cost drastically increases runtime.
Suggested Solution
Do not apply a default batch size.
- is depended on by
-
MONGOSH-885 Use old-shell batching behavior for cursors on getMore calls
- Closed
-
MONGOSH-877 Batch size configuration option should only affect display batch size ("it" value)
- Closed
- links to