Hello,
I am reading more than a million record using CursoredStream, following is my code snippet for reading data
ReadAllQuery query = new ReadAllQuery();
query.setReferenceClass(DataBk.class);
query.useCursoredStream();
CursoredStream stream;
stream = (CursoredStream)dbses.executeQuery(query);
while (!stream.atEnd()) {
vector1 = stream.read(stream.size());
}
Problem is I am getting
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
I was reading other forums posts about this and it is mentioned that memory heap size could be increased.
Where do I increase memory heap size?
2519873
Besides, if my above code is not alright, someone could suggest best approach for reading and writing bulk data.
Regards
Edited by: user20090209 on Oct 14, 2009 10:17 AM