Download Criteria
This section provides information on the recommended usage of Download Criteria. The primary purpose of the Download Criteria is to download non-transactional master data such as Accounts, Contacts, Installed Products, and so on.
Do not use complex formula fields in Download Criteria: Since download criteria can possibly return large datasets, it is recommended that you refrain from using complex formula fields as criteria for download because it can lead to ineffective long-running queries. Instead, use literals wherever applicable.
Do not create queries that return more than 30% of the object size: As per Salesforce guidelines, queries should be configured in a way so that they do not return more than 30% of the total dataset size of an object. It is recommended that you use the same guidelines when using Download Criteria for optimal performance.
Employ Data archival policy for large objects: Each organization should have a data archival policy in place to ensure objects do not have unnecessary data leading to deficient performance of queries. Ensure that you do not have objects included in queries with millions of records unless it is necessary. Especially for events objects, the record size should be limited to no more than ~ 200K records.
Request Salesforce to create an index on large objects: If any object requires to have more than 200K records, it is recommended that a request is logged with Salesforce to create an index.
Add criteria on the indexed field: In addition to having an index, it is recommended to add some criteria on the index field to make the SOQL query more selective.
Was this helpful?