Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Looping through recordsets in Java is terribly slow

843798Jan 13 2007 — edited Jan 25 2007
Hi All,
I am a decent java programmer(or at least I presume to be).Recently I had to work with a application where I connect to Oracle database and fetch huge number of records(in terms of say 0.2 million).application was painfully slow.

I started working on the optimizing the PL-SQL query but to my amusement query took just 70milliseconds to fetch about 50000 records.The resultset of this fetch is looped through in Java and the fields are put into a Java bean.This took about 21 seconds.Is this a norm or exception?Does this reflect poor coding.I am amused as all that I do in the fetch is just loop through the recordset and put the fields(about 7 fields) into the bean.

Could anyone throw some light on this?Thnks in advance.

Best Regards,
Prithvi
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2007
Added on Jan 13 2007
1 comment
140 views