does `fetchBatchedResults` load the full `Iterable...
# exposed
e
does
fetchBatchedResults
load the full
Iterable<Iterable<ResultRow>>
into memory? How to deal with a large resultset? Any suggestions?
c
Hi @Endre Deak If the
sortOrder
argument is ascending, then
fetchBatchResults()
relies on an iterator that generates an offset variant of the invoking query. This query is executed and yields an
Iterable<ResultRow>
of the specified
batchSize
, for only as long as a next value is requested. For example, if the full result set would contain 1000 records and
batchSize
is set to 50, converting the iterable to a sequence and chaining
take(3)
, for example, would retrieve 3 batches and load 150 records.