Skip to content

Base.find(String query, Object... params) is fetching the whole resultset instead of streaming it #1101

@alniks

Description

@alniks

the code is passing 0 to the method which sets fetch size:

find(RowProcessor.ResultSetType.FORWARD_ONLY, RowProcessor.ResultSetConcur.READ_ONLY, 0, query, params)

according to docs 0 is ignored:

https://docs.oracle.com/javase/7/docs/api/java/sql/Statement.html#setFetchSize(int)

which leads to fetching whole resultset into memory.

I would set the default value to at least 10 to save on network calls

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions