For consistency, I usually have autocommit set to false for all my JDBC calls. I know when it's necessary to have for complex transactions, such as multiple batch queries, insert/update/delete calls and so forth. Is there any performance hit or other issues using manual transactions for single calls (see example below)? Simple example:
posted 14 years ago
There's no performance hit - in fact if you save up your commits until the end of all the db calls, you can get a performance gain, since you only do one commit, compared to autocommit which does a commit for every statement.
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.