• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

increas perfomance of getting data

 
hanihanan younis
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
my probelm is in my web i get thousands of rows from a table in DB..i put it in a vector then display it in a page..but this take a lot of time..i userd preparedstament technique..is there onthere technique to speed up the showing of data..plz who will anwer give me complete & clear answer
with thanx to all who care about my problem or read it...i appreciate all
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15627
46
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change the SQL statement in your program so that it does not return thousands of rows.

Displaying a page with thousands of results is never necessary. Nobody wants to see a page with thousands of result rows on one huge page.

So change your SQL to limit the number of rows returned and implement a paged approach, i.e. show a page with for example the first 20 results and provide previous / next buttons or links to see the rest of the results.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JDBC forum.

Dave
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic