Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best practice to access large data from database

 
Bob Moor
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,

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..


Thanks in advance ,
Bob
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"tec tech", please check your private messages for a JavaRanch administrative matter.

Welcome to JavaRanch.
You can check our FAQs on Pagination, or read our Journal on the subject.


Regards, Jan
 
Bob Moor
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Jan,

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?

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tec tech wrote:any suggestions?

Please check your private messages first.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic