-->
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.  [ 1 post ] 
Author Message
 Post subject: Poor performance of session.createSQLQuery() vs Session.doWo
PostPosted: Thu May 20, 2010 10:32 am 
Newbie

Joined: Tue Apr 25, 2006 11:49 am
Posts: 2
Hi,

I'm facing weird difference in performance of SQL queries when I run it using session.createSQLQuery().

* query using Session.doWork() + jdbc API takes ~2 seconds.
* Same for sqlplus/Sql Developer
* very same SQL query ran using session.createSQLQuery() takes over 10 seconds.

I see that application spends time in AbstractBatcher.getResultSet(), the "ResultSet rs = ps.executeQuery();" line. Also I verified via "org.hibernate.SQL" category that SQL statement is indeed the same.

Any ideas what could cause such a difference?

hibernate 3.3.1
Spring 2.5.6, HibernateTemplate
Oracle RAC 11g

Thanks,
Pavel


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

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.