-->
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: hibernate select query slow
PostPosted: Tue Jun 29, 2010 4:55 am 
Newbie

Joined: Tue Jun 29, 2010 4:20 am
Posts: 2
Hello, at first sorry for my bad english, just for the information, i posted the same question in the german form.
my queistion is considering the hibernate performance: i have read that hibernate isnt such fast as sql, on the other side it does a lot of job for you, you would have to do manually with sql. but is it really true that the sql is about 10x faster than hibnernate ?
in my app, i have a table with 25 rows: hibernate needs to query it about 2,5 sec in best case, sql 0,2.
query has the form"where columnname='value'. my app should read the data much more faster, if you consider that my table will have several hundert rows. perhaps is there a way to decrease the hibernate overhead to minimum, to get more performance? or are there some other ways, ideas etc. to increase speed? could my hql query be the reason?im getting the Session with HibernateUtil.getCurrentSession. Then i start a Transaction and call Session.createQuery method? (can i use createSQLQuery instead? would this make some performance improvements?), or could the problem be with hibernate.cfg.cml?
Best regards, Edin


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.