-->
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.  [ 2 posts ] 
Author Message
 Post subject: Performance of Native SQL Update Queries using Hibernate.
PostPosted: Fri Oct 05, 2012 12:37 am 
Newbie

Joined: Thu Oct 04, 2012 10:40 pm
Posts: 2
Hi everyone,
I need some assistance regarding the performance of update queries when executed through Hibernate. The problem scenario has been explained below.

Problem Scenario :- My Java application uses Hibernate to connect to Postgres 9.1 database and perform necessary operations. Since I am dealing with tables that are created dynamically, therefore, I create dynamic update statements in the native Sql within the application, and execute them using the executeUpdate() method of the SQLQuery class. The amount of data on which these updates may happen can range from a few thousand records to millions.

Issue :- The problem is the performance of the query. When executing the dynamically formed update query directly on the DB, it takes a few seconds ( Initially tested for 60000 records ) whereas, the same query when executed through application took around 18 minutes to execute for the same set of records. The execution times grow out of proportion as the number of records on which the update operation is happening increases.

What can be the possible cause of this difference in the execution time? Is there some Hibernate setting that I need to check or configure before execution?

Any pointers or suggestions will be greatly helpful.

Thanks in Advance,
Amal


Top
 Profile  
 
 Post subject: Re: Performance of Native SQL Update Queries using Hibernate.
PostPosted: Mon Nov 19, 2012 9:01 am 
Newbie

Joined: Thu Oct 04, 2012 10:40 pm
Posts: 2
Hi,

this has been resolved. The issue was with the database table configurations and memory settings.

Thanks,
Amal


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.