I have requirement to fetch 5 Million records from Oracle db and display using JAVA and JSP. Each record is 1 KB size.
The database table is online table used to store the transaction details, the rows will keep increasing. I am not allowed to use stored procedures also.
1) Fetching 5 Million record and displaying in 1 attempt is not feasible as JDBC has limitation and also the User has to wait too long to see the data.
I am thinking of processing the records in subset, for example.. Display first 10000 records then if the users wants next 10000 records fetch and display the next 10000 record.
Are there any other best practices to implement the above requiremen? Please suggest..
Welcome to JavaRanch.
You can check our FAQs on Pagination, or read our Journal on the subject.
OCUP UML fundamental and ITIL foundation
Joined: May 24, 2010
Thanks for your response. All the example are using rownum. My table rows increase every second hence I dont think I can use rownum.
rowid should solve the problem but I dont know to build query with rowid. any suggestions?