Large Result Not Chunked (ARCH4062)
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
Key java.orm.large-result-not-chunked · Severity info · Category orm
Loading a large result set fully into memory and iterating it exhausts memory at millions of rows. Use a streaming/chunked cursor.
Incorrect
Section titled “Incorrect”List<Log> logs = logRepository.findAll(); // all in memoryfor (Log log : logs) { archive(log);}Correct
Section titled “Correct”try (Stream<Log> logs = logRepository.streamAll()) { logs.forEach(this::archive); // row-by-row stream}Process large results with a Stream/chunked cursor instead of loading them all at once.