db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: [OJB 1.1] m:n performance, insert order changes
Date Thu, 16 Sep 2004 18:40:41 GMT
Jakob Braeuchi wrote:

> hi armin,
> 
> imo the main difference is that you store all referenced objects and the 
> retrieve the existingMtoNKeys only once (wheras my old solution 
> retrieved the mnkeys after each store).
>

yep, simple but effective ;-)
Do you have additional m:n test cases to chack for side-effects?

Armin

> jakob
> 
> Jakob Braeuchi schrieb:
> 
>> hi armin,
>>
>> could you please explain how achieved this performance gain ?
>>
>> jakob
>>
>> Armin Waibel schrieb:
>>
>>> Did someone have a look at this?
>>> I want to know if my changes are valid (any side-effects), because I 
>>> want to make the changes of the m:n insert order in 1.0.x branch too.
>>> 6 times better performance is a good argument ;-)
>>>
>>> regards,
>>> Armin
>>>
>>> Armin Waibel wrote:
>>>
>>>> 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
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
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