-->
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: Performance Issues with first level cache
PostPosted: Sun Sep 30, 2007 8:02 am 
Beginner
Beginner

Joined: Mon Jul 30, 2007 4:58 pm
Posts: 21
Hello,

I've encountered a strange problem recently.

Say I have 10000 students in my db. And I load them by

IList<Student> students = studentDao.FindAll();

now that all the students have been loaded within the session.

The problem is after loading such a nubmer any time I make a query like

Student s = studentDao.FindByName("John");

this could take up to 500 ms which is unacceptable.

The only fix I could figure out was clearing the session.

Could anyone tell me if this is a bug ? Why loading many items degrades the performance of my queries ?


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.