You need to sign in to do that
Don't have an account?
Mani Penumarthi
Query Limit 50000 Exceed.
Hi Guys,
I have generated a matrix format report in sandbox. But when I am trying to move that to production I am getting these Query Limit Exception.
In test class I have used seeAllData Annotation. If though error was due to these but when I see the records in the production there is only 4000 records.
Can any one help me why I am getting these exception.
I have generated a matrix format report in sandbox. But when I am trying to move that to production I am getting these Query Limit Exception.
In test class I have used seeAllData Annotation. If though error was due to these but when I see the records in the production there is only 4000 records.
Can any one help me why I am getting these exception.
Can you check if you are using a SOQL query in loops? It could be an issue with improper bulkification.
Thanks,
Shashank
I have not used any query inside the for loop.
What I am trying to develop is some thing that similar to martix report as we need the three level grouping.
So I have used couple of loops one inside other using collections.
I think these may causing the error. But If you get a chance can you sugget me some alternative solution that reduce the loopings
If I can have a look at the whole code, I may be able to suggest something.
Thanks,
Shashank
Can I send the code via an email.
My Id is manikumar.pnbs@gmail.com
There are quite a few SOQL queries in your class, and aggregate queries as well. In aggregate queries, for example, even if you are just saying select count(), and the count is 100, it will be counted as retrieving 100 rows, and these count against the governor limits. This could be the reason for the limit being breached.
You may have to downsize your report to a shorter date range, so that governor limits are not hit in your production.
Thanks,
Shashank
Can you please let me know how standard matrix report is working on.
Standard reports don't have governor limits and do not use SOQL, and hence will never hit governor limits. Governor limits and SOQL are only for the custom code that we write.
Thanks,
Shashank