For optimizing queries, especially on large data volumes, it's recommended to use indexed fields such as External ID fields, which will make the queries selective. Among the options given: B) is optimized because it is using the Customer_Number__c field, which is an External ID and hence indexed. D) is also optimized because it filters out deleted records with IsDeleted = false and uses Name != ' ', which is likely to be selective. Using indexed fields and filtering out unnecessary records helps in faster query execution on large data volumes. References: Make SOQL Query Selective Working with Very Large SOQL Queries
最新のコメント (最新のコメントはトップにあります。)
This answer is probably B and C