These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Performance Considerations: Copy huge loads of data
PostPosted: Fri Feb 18, 2011 3:35 pm 
Regular
Regular

Joined: Wed Nov 01, 2006 2:17 pm
Posts: 78
Hello Hibernate community!

I am currently in the situation to make a decision between using JPA/Hibernate or plain JDBC. One task of my scenario the software will have to achieve, is to PLAIN COPY huge amounts of data between tables (>100,000 rows). When using Hibernate Entities for this, I imagine the heap space of the JRE will be stressed quite a lot. Also, iterating over the data entries seems to be a severe performance concern. One could make use of native SQL to copy these rows, however this appears to be bad practice, as I would mix Hibernate queries with plain SQL in the software.

Do you know about any functionality JPA/Hibernate provides, to execute huge copy transactions AS FAST AS PLAIN SQL would do without using native SQL?

Highly appreciate your input!


Top
 Profile  
 
 Post subject: Re: Performance Considerations: Copy huge loads of data
PostPosted: Sat Feb 19, 2011 6:58 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
INSERT INTO ... SELECT ... FROM .... is supported as described in:

http://docs.jboss.org/hibernate/core/3. ... tch-direct


Top
 Profile  
 
 Post subject: Re: Performance Considerations: Copy huge loads of data
PostPosted: Sun Feb 20, 2011 9:45 pm 
Regular
Regular

Joined: Wed Nov 01, 2006 2:17 pm
Posts: 78
That's true! And this is what I need! Thank you!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.