db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject [OJB 1.1] m:n performance, insert order changes
Date Tue, 14 Sep 2004 16:04:06 GMT
Hi all,

while implement the new batch handling I stumble across a performance
issue of the m:n insert operation with auto-update setting to
'object/true'. If I do a manually insert using the "link" methods the
performance is ok.
But when I try to insert an m:n relation (auto-update=object) with 3000
objects (one movie object with 2000 actors and one actor has 1000 movies
referenced back) it takes endless 55000 ms!! (Manually 7079 ms) (maxDB +
OJB on same single cpu machine).

So I start to experience with object n-side insert order in method
PB#storeAndLinkMtoN.
After many trail and error there seems to be a valid solution to
increase insert performance. With the new method version it takes 8437
ms to insert the 3000 objects (Manually 7094, same as before). So the
new version is more than *6 times faster* as the old version. The
test-suite tests pass too.

Please check the new code in PB#storeAndLinkMtoN(...) and run your own
tests against this new version to verify my changes.

Should we use the new version in 1.0.x release branch too?

You can do the performance test by your own using M2NTest from test suite.

first test use automatic m:n handling (auto-update=object)
[M2NTest#testMassStoreUpdateAutomatic]

second test set auto-update=none and use link methods
[M2NTest#testMassStoreUpdateLinking]

With new batch handling enabled it is possible to increase performance
to 5469 ms for the 3000 object inserts (manually 4609). Additionally 30%
performance increase.

regards,
Armin





---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message