- How many records can be displayed in a
- Is it possible for 50000-100000 in single page?
There are several limitations that come into play here.
- The component that you'd be using to display all of these records,
<apex:dataTable>can only accept up to 1000 rows of data
- You need to consider how the number of records affects the size of the visualforce viewstate. The viewstate has a limit of 135kb, which you'd most certainly hit if
<apex:repeat>and the like could accept more than 1000 rows
- If the first two items weren't an issue, you can normally query up to 50,000 records in a single go. There are ways to work around this, but 50,000 records is already impractical to display
- It isn't a system limit, but if none of the 3 points above were issues, loading so many records onto a single page would be extremely slow
If you absolutely need to display so many records, you'll need to turn to pagination. You can use an
ApexPages.StandardSetController to help out with this. Jeff Douglas has a good demo of how to accomplish this.
At any rate, I'd seriously consider taking a closer look at why you think you need to display so many records, and try to find a way to reduce the number of records somehow.
From My Notes:
If you fetch directly such number of records through SOQL using ReadOnly annotation, it would take very long time that there would be a timeout related to remoteAction. Even i'm quite sure there will be timeout only after 10000 or 20000 records.So it's better to fetch couple of thousand record and use pagination for further record fetching.
It's always better to apply filters and search functionality for such cases.
Now it's not clear from your question why you want to actually fetch that many records.So it's better if you provide more details.
from comments: So it seems that you can increase the timeout of remote calls, check this link for better understanding.You can increase it upto 120 seconds but in my opinion that would also a very bad user experience so i would again stay with more filters and a better search functionality with proper pagination.