Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Database rows fetching

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search this forum with keywords "paging", "pagination", "LIMIT".
This gets asked (and answered) a lot here.
 
vjy chin
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic