Handling Large Resultset in Oracle

Somendra Paul <[email protected]> Sun, 21 Sep 2008 07:37:55 -0700 (PDT)
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hi All,=0A=A0=A0=A0=A0=A0=A0 I am using OJB1.4 against Oracle10g with class=
es12.jar. We are trying to export data from the DB, using SQL query which r=
eturns 600000 records , what we found out that is when we do iterator =3D q=
uery.getIteratorByQuery(),and iterate over the results,=A0 we find that aft=
er iterating over 300000 records, the VM grows rapidly and the entire progr=
am crashes giving OOM errors, where as when we used simple JDBC program to =
implement it, we saw that the entire 600K records were extracted using only=
 160mb of memory , and the ojb execution takes more than 1.5gb to execute b=
efore crashing. =0A=A0=0ADo we know how to solve this memory issue when exe=
cuting large resultset in Oracle.=0A=A0=0AOne solution that in the OJB arch=
ives for ProgressSQL is that to use fetchSize=3D<somevalue> , it will solve=
 this issue ???=0A=A0=0A=A0=0AThanks and Regards=0ASomendra Paul.=0A=0A=0A =