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
J&A-DevJ&A-Dev 

Help processing over 10K records from SOQL

Hi,

 

I need to be able to query around 50,000 records and I'd like to know if this is possible using pure Apex/VisualForce. I'm reading the Visualforce documentation and it looks like there is a 10,000 rows limitation on VisualForce if used within a For loop. What would you recommend I do?

 

This is what I'm trying to do:

- query all rows within custom object (around 50k).

- return the sum of a sales field from the above rows.

 

I've tried writing separate functions that will each return a sub-set of the 50k rows, but as soon as the total number of rows from all queries goes over 10k, I'm hitting the governor's limit. If what I'm trying to achieve is possible using only Apex and VisualForce, I'd love to hear suggestions.

 

Thanks in advance.
Ron HessRon Hess
Not with the current features, sorry.