• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Scrollable pages

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Scrollable pages
================
I have a jsp search page that I want to implement as scrollable.
There is a a search criteria on top and then there can be 20 lines of
found lines.
At the bottom there is a forward and a Next button ,in order to get next 20.
At the botton there is a text something like:
Lines 1 to 20 of 2000
My application Server is located in host_A and my dataBase is in host_B.
Assume that I want to read the database and populate the screen for first page.
That means I'm only interested in the first 20 rows and the total number of rows in the
resultset.

Problem 1:
Since I'm only want the first 20 rows I don't want to move 2000 rows over the
net (performance), how can I prevent that ?
Is there any possibility in the sql ?
problem 2:
How can I find out the the total number of rows in the resultset without
reading through it ? There is no method in ResultSet...
I've tried the last() method but that seems equalily as slow.
regards
Per Lovdinger

 
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. setFetchSize
Dan
 
reply
    Bookmark Topic Watch Topic
  • New Topic