skip to main content
Designing JDBC applications for performance optimization : Managing connections and updates : Choosing the right transaction model
  

Try DataDirect Drivers Now

Choosing the right transaction model

Many systems support distributed transactions; that is, transactions that span multiple connections. Distributed transactions are at least four times slower than normal transactions due to the logging and network round trips necessary to communicate between all the components involved in the distributed transaction (the JDBC driver, transaction monitor, and DBMS). Unless distributed transactions are required, avoid using them. Instead, use local transactions when possible. Many Java application servers provide a default transaction behavior that uses distributed transactions.
For the best system performance, design the application to run using a single Connection object.