• 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

Rendering Large resultset

 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends,

I need your help for the scenario i am explaining here.

I have search form, from here user will search for the records by giving search options which will featch the records from the database. I am using display tag library to display them as a table in jsp. I am using this because i need pagination and exporting fetaures.

I am buillidng the collection object from the result set and put that object in session which i feed to display tag to display them.

But here the problem is, for small and medium no of records it is ok, but if the records are million i am getting out of memory or heap size error.

so I need your help to overcome this problem. Please rember i need to let the user to export the records in csv and excel and need to do pagination as it is very hard to see all the millon records in single page.

Thanks in advance.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See the JSP FAQ. It details the way to tell the database to only fetch the records needed for the current page. Fetching anything else is a waste of resources and needless.
 
A Babu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anyone help?
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just in case you could not understand what Bear wanted to indicate try this link. Pagination

As for you excel/csv, retrieve all the records and write them into a file instead of adopting the above process.
 
reply
    Bookmark Topic Watch Topic
  • New Topic