Added naive batch processing optimization: accumulating multiple update statements into a single database statement and transaction.