[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Batch Inserting and OptimisticLock
|
Hello,
I have a performance issue doing persist-operations in following scenario:
Eclipselink 2.3.3
* Entity ISResult with a one to many Relation to Entity DemandData
<orm:one-to-many name="demandDatas" mapped-by="isResult"
target-fetch="LAZY">
<orm:cascade><orm:cascade-all/></orm:cascade>
<orm:private-owned/>
</orm:one-to-many>
* for OptimisticLocking i use in every entity:
<orm:version name="versionTimestamp">
<orm:column name="TSUPDATE" nullable="false"/>
</orm:version>
* i have enabled
eclipselink.jdbc.batch-writing=Oracle-JDBC
eclipselink.jdbc.batch-writing.size=1000
When creating a new ISResult with X>1 DemandDatas and do
EntityManager.persist(result):
--> the SQL trace shows for everyDemandData
SELECT SYSDATE FROM DUAL
INSERT INTO ...
So Batch-Writing does not work and its pretty slow...
I tried as workaround in DemandDatas:
--> remove version
<orm:basic name="versionTimestamp">
<orm:column name="TSUPDATE" nullable="true"/>
</orm:basic>
--> use another optimistic LockingType
<orm:optimistic-locking-type>CHANGED_COLUMNS</orm:optimistic-locking-type>
--> Now Batch Writing works and its fast:
bind => [44942813913, 4, null, null, 195.699981689453125, 15, 10,
4.6305999755859375, 0, 0, 0, 0, 0, 0, null, 0, 0, 0, 32532872, 0, null,
null, 0, 0.74900054931640625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
null, 0, 0, 0, 0, 0, null, null, 0, 0, 0, null, 201421, 2, 2013-07-16
08:15:50.646, 111922823]
[EL Fine]: 2013-07-16
08:15:57.412--ClientSession(9425697)--Connection(4268987)-- bind =>
[44942813546, 2, null, null, 544.05010986328125, 149, 44,
2.1071999073028564453125, 0, 0, 0, 0, 0, 0, null, 0, 0, 0, 32532870, 0,
null, null, 0, 0.22990703582763671875, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, null, 0, 0, 0, 0, 0, null, null, 0, 0, 0, null, 201424, 2,
2013-07-16 08:15:50.645, 111922823]
[EL Fine]: 2013-07-16
08:15:57.412--ClientSession(9425697)--Connection(4268987)-- bind =>
[44942813573, 0, null, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null, 0, 0, 0,
32532868, 0, 0, null, 0, 0, null, null, null, null, null, null, null, null,
null, null, null, null, null, 0, 0, 0, null, null, 0, 0, 0, null, null, 0,
0, 0, null, 201213, 2, 2013-07-16 08:15:50.645, 111922823]
...
Is there a configurationproblem or a bug?
Stefan
--
View this message in context: http://eclipse.1072660.n5.nabble.com/Batch-Inserting-and-OptimisticLock-tp161429.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.