I am writing a Java application utilizing Hibernate for Oracle access. I am processing orders with order lines stored in a table.
I need to scroll through all order lines and process them, but there might be 20 000 order lines, and they might have data fields of up to 5000 characters.
How should this be done in Hibernate? I have read that server side cursors are not supported on Oracle 9 and that it emulates scrolling by caching all records in JVM.
Should I read e.g. the 1000 first ids and then process them, and then continue with the next 1000 etc?
I'd rather not load 20 000 records * 5K into memory...
(PL/SQL is not an option here...)
|