in reply to Proper Syntax for DBI multiple row insert
If you're worried about the relative overhead of many execution calls (one row at a time) versus one execution call (with many rows at once), bear in mind that if you turn off auto_commit, and explicitly commit after all the row executions have been done, there shouldn't be any serious difference in run-time, relative to doing many rows in one execute call.
I could be wrong about that - I've never tried a multi-row insert via DBI, so I haven't had occasion to benchmark it. But I do know that when doing lots of single-row executions (for inserts or updates), it can make a BIG difference (orders of magnitude) if you commit just once at the end -- or, if you're doing 10's or 100's of thousands of row inserts, do a commit every few thousand rows, just to keep the transaction size from getting out of hand.
|
|---|