System.LimitException: Too many query rows: 50001 – How to solve it with a batch?
I need to create a summaries record for each result generated by the following query, which returns around 12K.
I need to create a summaries record for each result generated by the following query, which returns around 12K.
We have a pretty complex trigger suite on our org. We’ve built a lot of custom functionality. I’m starting to worry about governor limits and not really understanding how to manage them. I’ve read through http://wiki.developerforce.com/page/Apex_Code_Best_Practices and I’ve made all my triggers accordingly, using as few SOQL and DML statements as possible, querying the database only when I have to and getting all the records I need at once, etc.