Missing Bulk Operation (ARCH3053)
Key typescript.orm.missing-bulk-operation · Severity warning · Category orm
Repeating a single-row insert in a loop when a bulk/batch API exists (insertMany/createMany/AddRange/insert_all) produces needless round-trips. Collapse the operations into one bulk call.
Incorrect
Section titled “Incorrect”for (const u of users) { await prisma.user.create({ data: u }); // an insert per row}Correct
Section titled “Correct”await prisma.user.createMany({ data: users }); // one bulk insertConvert the per-row writes in the loop into the framework’s bulk/batch API (createMany/insertMany).