On inserting many, many rows

In the documentation, the following insert with multiple rows is described:

await db.insert(users).values([{ name: 'Andrew' }, { name: 'Dan' }]);


In a project of mine, an insert query grew to 10k rows to be inserted at once. So, I was wondering, if it is good practice to throw this whole thing at the insert query or if I am responsible to batch the inserts to smaller more reasonable chunks? I am using Postgres. Thank you for any hint on this topic.
Was this page helpful?