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 ?
|
|