[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1) Optimize Hibernate for the bulk insertion of related entities

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Feb 21 10:23:33 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1?page=comments#action_26201 ] 

Steve Ebersole commented on HHH-1:
----------------------------------

This limitation regarding <join/>s is not even within the realm of control for this solution.  And actually the same limitation would hold as well in the case of <joined-subclass/>.

The reason is that it is actually the persister which performs the atomic inserts, not the actions.   

Example:
class Super { ... }
class Sub extends Super { ... }

For each entity creation here we have exactly one entity insert action even though we will have 2 inserts commands executed (again, same thing for <join/>).  Again, this is controlled by the persister, not the action.

To properly account for those scenarios, we would need to tweak the algorithm such that it could group together Sub entity insertions within a given relational dependency chain and then have the atomic inserts performed together for any given level of dependency.  There are a couple of way to achieve that aspect.  I'll give some thought as to the most proficient way to to it.


> Optimize Hibernate for the bulk insertion of related entities
> -------------------------------------------------------------
>
>          Key: HHH-1
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1
>      Project: Hibernate3
>         Type: New Feature

>   Components: core
>  Environment: Hibernate 1.2, MySql 3.1
>     Reporter: Bradley Leupen
>     Priority: Minor
>  Attachments: bulk_insert.patch
>
>
> It is currently difficult to batch the creation of persistent entities that maintain associations with other entities.
> Add necessary api to hibernate to support the save or update of a collection of entities. An optimization can be applied in this scenario to group inserts / updates by entity class, or table. This will enable the hibernate engine to utilize batching if available, drastically improving performance over a network. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list