Endre Deak
02/21/2025, 8:08 PMfetchBatchedResults
load the full Iterable<Iterable<ResultRow>>
into memory? How to deal with a large resultset? Any suggestions?Chantal Loncle
04/01/2025, 12:37 AMsortOrder
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.