File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Database rows fetching Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Database rows fetching" Watch "Database rows fetching" New topic
Author

Database rows fetching

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
We are fetching data from DB using servlets and forwarding that data as o/p to the enduser in jsp page.if we r fetching 200 rows from the database,if it displays all the 200 rows at a time the perofrmance will be low .how can we display allthe rows at a time with out effecting the performance
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Search this forum with keywords "paging", "pagination", "LIMIT".
This gets asked (and answered) a lot here.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
vjy chin
Ranch Hand

Joined: Feb 17, 2005
Posts: 279
One way you can do is to get all the records and store in session, then display 10 records using pagination. So if the user clicks next, next 10 records will be displayed from the session (it does not need to go back to database). But if you dont want to use sessions, then I am not sure.

Experts can throw more light on this.
Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Database rows fetching
 
Similar Threads
Million Records to be Fetched
Performance between ..searching in . hashmap or xml document
oracle table caching in java Map
Refreshing JTable contents handling.
Performance Issue