-->
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: Query from hibernate running slow
PostPosted: Fri Nov 26, 2010 6:36 am 
Newbie

Joined: Fri Oct 14, 2005 7:52 am
Posts: 9
Location: delhi
I am running one query from mysql then it is running fine but when run from application it takes time .
Any clue .


Top
 Profile  
 
 Post subject: Re: Query from hibernate running slow
PostPosted: Tue Nov 30, 2010 1:31 am 
Newbie

Joined: Fri Oct 14, 2005 7:52 am
Posts: 9
Location: delhi
I am using code as :

List list = getHibernateTemplate().find(query, params);

retunr list.size();

It is taking a lot of time .

Thanks to please help.


Top
 Profile  
 
 Post subject: Re: Query from hibernate running slow
PostPosted: Tue Nov 30, 2010 12:24 pm 
Senior
Senior

Joined: Tue Oct 28, 2008 10:39 am
Posts: 196
rajnishe wrote:
I am using code as :

List list = getHibernateTemplate().find(query, params);

retunr list.size();

It is taking a lot of time .

Thanks to please help.


You know "select count(*) from..."?
You are reading all rows into memory and count there.


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.