Why do spring/hibernate read-only database transactions run slower than read-write?
I've been doing some research around the performance of read-only versus read-write database transactions. The MySQL server is remote across a slow VPN link so it's easy for me to see differences between the transaction types. This is with connection pooling which I know is working based on comparing 1st versus 2nd JDBC calls. When I configure the Spring AOP to use a read-only transaction on my DAO call, the calls are 30-40% slower compared to read-write: <!-- slower --> <tx:method name="find*" read-only="true" propagation="REQUIRED" /> ... // slower @Transaction(readOnly = true) Versus: <!--