You need to sign in to do that
Don't have an account?
Marcel Gómez
Weird limit exception retrieving 18 rows :?
Hey!
I'm repeatedly getting following known exception:
This is my query:
This is the log main lines, check the 2nd line to verify there is only 18 rows retrieved:
Thanks guys!
I'm repeatedly getting following known exception:
Too many query rows: 50001 An unexpected error has occurred. Your development organization has been notified.The thing here is that my query is retrieving only 18 rows, so my jaw fall to the floor instantly.
This is my query:
SELECT Date__c, Country__c FROM Insight2__c GROUP BY Date__c, Country__c ORDER BY Date__c ASC
This is the log main lines, check the 2nd line to verify there is only 18 rows retrieved:
16:24:46.0 (110288675)|SOQL_EXECUTE_BEGIN|[6]|Aggregations:0|SELECT Date__c, Country__c FROM Insight2__c GROUP BY Date__c, Country__c ORDER BY Date__c ASC NULLS FIRST 16:24:46.0 (380090845)|SOQL_EXECUTE_END|[6]|Rows:18 16:24:46.0 (380142615)|EXCEPTION_THROWN|[6]|System.LimitException: Too many query rows: 50001 16:24:46.0 (380413663)|HEAP_ALLOCATE|[6]|Bytes:30This is the screenshot of the developer console query editor with the exact same query and the above mentioned 18 rows:
Thanks guys!
Could you please post your code here?
This is my code, methods called from here do not perform any query at all, just calculations:
Thanks
http://salesforce.stackexchange.com/questions/116977/weird-limit-exception-retrieving-18-rows
If you want to handle this situation then go for Apex Batch there you can query 50M records.
Regards,
Naval