79462483

Date: 2025-02-24 05:00:22
Score: 0.5
Natty:
Report link

Just tried to insert records in batches with batch size set to 100 and it worked. Now, I am going to increase the batch size to 200, 500 etc. and see what could be the maximum batch size.

for (let i = 0; i < cacheusers.length; i += 100) {
await AppDataSource.createQueryBuilder()
  .insert()
  .into(UsersCacheORM)
  .values(cacheusers.slice(i, i + 100))
  .execute();
}    
Reasons:
  • Blacklisted phrase (1): what could be
  • Whitelisted phrase (-1): it worked
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Ranjeet