File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Best practice to access large data from database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Best practice to access large data from database" Watch "Best practice to access large data from database" New topic
Author

Best practice to access large data from database

Bob Moor
Greenhorn

Joined: May 24, 2010
Posts: 7
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

Joined: Dec 20, 2006
Posts: 2491
    
    8

"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


OCUP UML fundamental and ITIL foundation
youtube channel
Bob Moor
Greenhorn

Joined: May 24, 2010
Posts: 7
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

tec tech wrote:any suggestions?

Please check your private messages first.


[My Blog]
All roads lead to JavaRanch
 
 
subject: Best practice to access large data from database
 
Similar Threads
How to retrieve partial data in SQL Server ?
urgent urgent .....How do i do paging in JSP ?????
Creating Temp table and querying it
Performance Problem?
"Next" button functionality