Hi Guys
Hibernate version: Hibernate3 Oracle version: Oracle9 Java Version: j2sdk1.4.2_04
I have database where I have more than 100 thousand rows in one table. If I try to fetch all at a time, I am getting java.lang.OutOfMemoryError
And if I try to fetch page by page e.g. by setting criteria.setFirstResult(startIndex); criteria.setMaxResults(25000); Then in second or third query, I am again getting the same error.
How do I know what is a capacity of session to hold N number of objects? or I shall do some smart caching or flushing? Please suggest some intelligent way to get rid of outOfMemoryError.
FYI: The object I am facing is internally has references to three more tables. Ultimately I am fetching N * 4 objects. And my primary objects has more than 15 columns, rest of the objects has 3 columns only.
Thanks and Regards Kavan
|