I am trying to execute several SQL statement in a batch mode to increase perfomance. Unfortunately, each statement can be a different type (Add, Change, Delete) to a different table so I can't use preparedStatments. I am just using the Statement object and using addbatch(<SQL STMT> ) to add them to the batch and then executing executeBatch(). Simple enough. Ideally, I am replacing 5-8 network calls with 1 network call and thus should really be increasing speed.
However, I notice from sniffing the network, that I am not achieving the increase speed I had hoped because even though I make one network call using the executeBatch() method, the method is still breaking my information up into smaller packets and sending them one at a time, waiting for acknowledgement between each.
Has anyone else been able to use executeBatch to improve network performance or is there a way I can change it to not wait for acknowledgment before sending the next packet.
Any help that anyone could offer would be greatly appreciated.