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

Governor Limits

Just a quick question on governor limits.


I noticed that there is a limit on how many records you can return at a time (10 000, if I am not mistaken).


In general i wont come close to that limit, but there are a few cases where i would need to return more than that limit.

What can be done to get around this? Is there a way around this, and if so, what can i do?






Check out the section titled SOQL For Loops Versus Standard SOQL Queries on page 54 of the Apex Developer's Guide



This has a nice description of the options available.

Yeah, you can't query more than 10,000 records in Apex. If you want to process more than 10,000 records then you have to use batch apex. You can find more about batch apex in Apex Langauage Refernce guide.