-->
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: Question about Criteria and Restrictions.in
PostPosted: Tue Jan 24, 2006 8:37 pm 
Newbie

Joined: Fri Sep 16, 2005 3:08 am
Posts: 15
Hello, all

I am using Criteria and Restrictions.in to load objects. I have 100,000 rows of Thing class, and I want to find those rows whose name is in a set.
Names are strings.

Set set = new HashSet();//put here 5000 names
getSession().createCriteria(Thing.class).add(Restrictions.in("name", set)).list();

And it runs so slow, seems will not stop.
But when I try the same operation directly with JDBC, it runs very fast.

Can anybody give me some suggestions, or is my way insane?

Thanks,


Top
 Profile  
 
 Post subject: sorry, I posted it to the wrong place. Discard it, pls.
PostPosted: Tue Jan 24, 2006 8:41 pm 
Newbie

Joined: Fri Sep 16, 2005 3:08 am
Posts: 15
sorry, I posted it to the wrong place. Discard it, pls.


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.