Skip to main content
edited body
Source Link
Lokesh
  • 163
  • 2
  • 7
  • 27

There is a object(assume A) which will store evertevent logs for a custom object(assume B). A batch job, runs weekly on object A to delete the records based on some conditions. It throws an exception like below:

System.LimitException: Too many query locator rows: 50000001

What is the recommended solution for this exception. There is already some WHERE clause in the SOQL query, but the matching record count is high.

Can we control this by keeping LIMIT 50000000 in dynamic query? But how to process all records in batch apex without skipping the records?

There is a object(assume A) which will store evert logs for a custom object(assume B). A batch job, runs weekly on object A to delete the records based on some conditions. It throws an exception like below:

System.LimitException: Too many query locator rows: 50000001

What is the recommended solution for this exception. There is already some WHERE clause in the SOQL query, but the matching record count is high.

Can we control this by keeping LIMIT 50000000 in dynamic query? But how to process all records in batch apex without skipping the records?

There is a object(assume A) which will store event logs for a custom object(assume B). A batch job, runs weekly on object A to delete the records based on some conditions. It throws an exception like below:

System.LimitException: Too many query locator rows: 50000001

What is the recommended solution for this exception. There is already some WHERE clause in the SOQL query, but the matching record count is high.

Can we control this by keeping LIMIT 50000000 in dynamic query? But how to process all records in batch apex without skipping the records?

added 1 character in body
Source Link
Lokesh
  • 163
  • 2
  • 7
  • 27

There is a object(assume A) which will store evert logs for a custom object(assume B). A batch job, runs everydayweekly on object A to delete the records based on some conditions. It throws an exception like below:

System.LimitException: Too many query locator rows: 50000001

What is the recommended solution for this exception. There is already some WHERE clause in the SOQL query, but the matching record count is high.

Can we control this by keeping LIMIT 500000050000000 in dynamic query? But how to process all records in batch apex without skipping the records?

There is a object(assume A) which will store evert logs for a custom object(assume B). A batch job, runs everyday on object A to delete the records based on some conditions. It throws an exception like below:

System.LimitException: Too many query locator rows: 50000001

What is the recommended solution for this exception. There is already some WHERE clause in the SOQL query, but the matching record count is high.

Can we control this by keeping LIMIT 5000000 in dynamic query? But how to process all records in batch apex without skipping the records?

There is a object(assume A) which will store evert logs for a custom object(assume B). A batch job, runs weekly on object A to delete the records based on some conditions. It throws an exception like below:

System.LimitException: Too many query locator rows: 50000001

What is the recommended solution for this exception. There is already some WHERE clause in the SOQL query, but the matching record count is high.

Can we control this by keeping LIMIT 50000000 in dynamic query? But how to process all records in batch apex without skipping the records?

Source Link
Lokesh
  • 163
  • 2
  • 7
  • 27

Batch Apex System.LimitException: Too many query locator rows: 50000001

There is a object(assume A) which will store evert logs for a custom object(assume B). A batch job, runs everyday on object A to delete the records based on some conditions. It throws an exception like below:

System.LimitException: Too many query locator rows: 50000001

What is the recommended solution for this exception. There is already some WHERE clause in the SOQL query, but the matching record count is high.

Can we control this by keeping LIMIT 5000000 in dynamic query? But how to process all records in batch apex without skipping the records?