Salesforce Visualforce collection iteration using apex:repeat supports a maximum of 10000 records in a read only transaction. If you want to go higher you need to use a different technique for fetching and iterating the data to display.
One approach is to handle the data table using JavaScript, using a Visualforce Remoting function that allows you to query the data for display (possibly in chunks, if you want to handle very large volumes of data or want to improve the user experience by loading the data in as the user scrolls - sometimes called infinite scrolling), then use JavaScript to iterate and insert this data into your DOM for presentation.
If your query has an ORDER BY that allows for completely deterministic ordering (e.g. if you want to order by Account Name but may have more than one Account with the same Name you should order by the name AND the ID), you can use the combination of ORDER BY fields to provide the equivalent of the SOQL OFFSET functionality without the 2000 record limit by essentially passing the last set of values for these ORDER BY fields to the VF Remoting function to tell it where to pick up. For example:
public static List<Account> getAccounts(String fromName, String fromId, Integer size) {
String query = 'SELECT Id, Name, ... FROM Account';
if (fromName != null && fromId != null) {
query += ' WHERE Name > :fromName OR (Name = :fromName AND Id > :fromId)';
}
query += ' ORDER BY Name ASC, Id ASC LIMIT :size';
return Database.query(query);
}
You then have to always collect the Name and Id from the last Account in the list in your JavaScript for sending these details back for the subsequent call to the remote function. This is then done iteratively to build the complete picture. (NB: This code is bare bones and should have error handling etc. added to it.)
WARNING: If you just keep loading and loading until you have all the data you will:
- Give a poor user experience as the page may take a very long time to load
- Make the browser take an even longer time to render the page once you add the data to the DOM
- Actually cause the browser to crash if there's simply too much data
In all honesty, there are very few cases where it is actually worth loading more than a few dozen records for users to view in a web page; if you actually want some form of report for offline analysis you are likely better off exporting the data rather than rendering it in a Visualforce page.