on spring, hibernate and batch insert-update
Most programming examples are about small amounts data processed, as it is the sufficient amount to demonstrate ideas. However one can sometimes run into cases involving insertion/update of 100k+ rows in a short amount of time and see that it's not practical with all default settings. Batch INSERTs and UPDATEs In most cases, every INSERT or UPDATE command to the database has a cost of sending a command through the network stack. The DBMS spends microsecond-level time to fulfil the command and the network takes millisecond-level time for the trip. JDBC API has a batch capability so that one can do more efficient than a command (and a millisecond trip) per row to be inserted. Batch Updates with Hibernate One can declare a batch-size attribute in the configuration and those entities begin. Not a bad idea if There's no need for insertion or the key property is not identity, as there's no standard way to batch-read generated keys. Objects with keys generated by the data...