Ir al contenido

Large Result Not Chunked (ARCH3062)

Esta página aún no está disponible en tu idioma.

Key typescript.orm.large-result-not-chunked · Severity info · Category orm

Loading an entire large result set into memory and iterating it can hold millions of rows in RAM at once. When a streaming/chunked cursor API exists, use it.

const all = await eventRepo.find(); // millions of rows into memory
for (const e of all) {
await process(e);
}
const stream = await eventRepo.createQueryBuilder('e').stream();
for await (const e of stream) {
await process(e);
}

Process large sets with a chunked cursor API such as stream/chunk/find_each.