function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sfdc Beginnersfdc Beginner 

Display 1 Million Records on Visulforce Page

How to Display 1 Million Records in a Page ?
Best Answer chosen by sfdc Beginner
James LoghryJames Loghry
Visualforce is not meant to display million(s) of records.  Depending on your use case you could implement a pagination solution or a filtering solution to filter VF to return a few records at a time, but in general VF doesn't handle that amount of data very well.  Not only do you run into SOQL governore limits, but view state and CPU limits as well.

If you're doing this as purposes for a CSV or PDF generation mechanism, then you should probably look at a more comprehensive, integrated solution or package, or simply use data loader as an alternative.