You need to sign in to do that
Don't have an account?
Vijay sidaraddi
I have a account object which contains 100000 records in it
Hi
I have a account object which contains 100000 records in it,if i want to write a SOQL query to fetch only 50000 records in it, how to achieve it..
As per governer limit we can retrieve max 50000 records for each SOQL query, is there any possibilities in trigger i can fetch more than 50000 records, if yes how?
Thanks
Vijay S
Thanks
Vijay S
I have a account object which contains 100000 records in it,if i want to write a SOQL query to fetch only 50000 records in it, how to achieve it..
As per governer limit we can retrieve max 50000 records for each SOQL query, is there any possibilities in trigger i can fetch more than 50000 records, if yes how?
Thanks
Vijay S
Thanks
Vijay S
For more info:
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_offset.htm
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks
All Answers
Try filtering the SOQL using the WHERE clause to filter your results to the particular Accounts you are interested in. Also, if you can, pick indexed fields like Id or External Id or Lookup / Master Detail fields which will help improve the performance of your SOQL query.
If the query is still too massive to do what you would like, consider moving the SOQL and any necessary apex into a Batchable Apex class, which will chunk the records into groupings of at most 2,000 records, making any queries and Apex more managable in terms of governor limits and general performance.
For more info:
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_offset.htm
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks