I have VF pages linked to custom controllers which query thousands of organization records and display them. I get the following email

Operation: /apex/SingleTicketAudit By user/organization: ###### Caused the following Apex resource warnings: Number of query rows: 50001 out of 50000

I checked my logs and it looks like SQL query limit is 50,000. This is a custom controller to generate a special report and I need to be querying thousands of records of data. What should I do?


1 Answer 1


You can use readonly for vf page in order to increase this limit to 1 million rows.

However you won't be able to make any dmls in read only mode.

This document would help you:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .