Skip to content

Add an option to specify the cursor.batchSize() for repository methods returning streams. [DATAMONGO-1311] #2225

@spring-projects-issues

Description

@spring-projects-issues

Christian Schneider opened DATAMONGO-1311 and commented

It would be great if you provide an option to set the cursor.batchSize() for Streaming Query Results.

In case of ETL where you process a lot of GB, streaming results is already heaven on earth compared to paging. In the MongoDBCursor default implementation the batchSize is set to 0 which means the database chooses it.

In my configuration the batchSize seems to be very small. I could observe that when I fetch data from a remote database.

Java MongoDB Driver BatchSize Option

Sidenote

I couldn't verify that overriding the batchSize gives the expected performance boost


Issue Links:

Referenced from: pull request #575

2 votes, 6 watchers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions