changing the default batch size #5318
Replies: 3 comments 3 replies
-
Hi @ariesandrada , I don't believe this is currently possible (from driver or Mongoid), can you describe your use case and what batch size you would like? |
Beta Was this translation helpful? Give feedback.
-
Looking at the code I don't see where the default of 1000 is defined, most likely the driver (and Mongoid) don't send any batch size by default and 1000 is actually the server's default. |
Beta Was this translation helpful? Give feedback.
-
I see. The recommended strategy for iterating cursors where each document takes a long time to process is to refresh the session being used, as described in https://jira.mongodb.org/browse/DOCS-11255. |
Beta Was this translation helpful? Give feedback.
-
I was wondering if it's possible to change the default batch size? it's mentioned in https://www.mongodb.com/docs/mongoid/master/reference/queries/#batch-size that the default is set to 1000. I looked around and can't find anything about it.
Beta Was this translation helpful? Give feedback.
All reactions