1 Reply Latest reply on Feb 12, 2009 9:48 AM by Ilya Shaikovsky

    partial page retrieve from database - is it possible?

    E Aish Novice

      Hi,

      Please help me with the below idea?

      In Richfaces, datatable and scrollabledatatable are available to display database driven data. They retrieve all the data from the related backend table and render them few records at a time on the web page.

      The problem we have is that our table has millions of records in it. To get selected records (based on some search criteria) itself would be overwheming to the memory. Because, both the above (datatable and scrollabledatatable) get all of the data to the memory from backend table and render partial pages. (Please correct me if my understanding is not correct).

      What would be a good option for us is -- to get the first 30 records from the backend table and display it on the page and when the user selects an option (like 'next'), get the next set of 30 recordsfrom the database table and displayon the web page, etc. If they click a link like previous, then go tobackend table to get the previous record set and display on web page. This way the memory would be loaded with a limited data, query would come back quickly with result set and only when needed we can go back to the database to get the next set of records. Yes, I understand that itwould involve back and forth database connection.

      Couldyou please guideme to a suitablesolution this problem

      Thanks
      Aish