Most of us might be using Spring and Hibernate for data access. I am trying to understand few of the internals of Spring Transaction Manager.
According to Spring API, it supports different Isolation Level - doc But I couldn't find clear cut information on which occasions these are really helpful to gain performance improvements.
I am aware that readOnly
parameter from Spring Transaction
can help us to use different TxManagers to read-only data and can leverage good performance. But it locks
the table to get the data to avoid dirty-reads/non-committed reads - doc.
Assume, in few occasions, we might want to blindly insert the records into a table and retrieve the information without locking the table, a case where we never update the table data, we just insert and read [append-only]. Can we use better Isolation to gain any performance?
- As you see from one of the reference links, do we really require to implement/write our own CustomJPADiaelect?
- What's the better Isolation for my requirement?