UnaryTableSequence per entity vs single table-sequence table [message #1386164] |
Fri, 13 June 2014 20:35 |
Alberto Otero Messages: 2 Registered: June 2014 |
Junior Member |
|
|
I have recently read a web page about identity and sequencing in JPA (en.wikibooks.org/wiki/Java_Persistence/Identity_and_Sequencing) where it says:
Quote:"One issue with table sequencing is that the sequence table can become a concurrency bottleneck, even causing deadlocks. ... In some cases the entire sequence table or the table page could be locked causing even transactions allocating other sequences to wait or even deadlock."
Quote:"TopLink, EclipseLink : Several additional sequencing options are provided. A UnaryTableSequence allows a single column table to be used."
As a conclusion, I suppose it is better to use one UnaryTableSequence per entity instead of a single table-sequence table for all entities because it will reduce the concurrency problems. Am I right?
Is there any drawback in creating one UnaryTableSequence per entity?
|
|
|
Powered by
FUDForum. Page generated in 0.04012 seconds