Consider the following code snippet: The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly. Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?

QuestionsCategory: Certified Platform Developer IIConsider the following code snippet: The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly. Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?
Admin Staff asked 4 months ago
Consider the following code snippet:
 Image
The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly.
Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?

A. Annotate the method with the @Future annotation.

B. Create a formula field to combine the CreatedDate and RecordType value, then filter based on the formula.

C. Break down the query into two individual queries and join the two result sets.

D. Use the Database.queryLocator method to retrieve the accounts.








 

Suggested Answer: C

Community Answer: C



This question is in Certified Platform Developer II Exam
For getting Salesforce Certified Platform Developer II











Disclaimers:
The website is not related to, affiliated with, endorsed or authorized by Salesforce. 
Trademarks, certification & product names are used for reference only and belong to Salesforce.
The website does not contain actual questions and answers from Salesforce's Certification Exams.

Recommended

Welcome Back!

Login to your account below

Create New Account!

Fill the forms below to register

Retrieve your password

Please enter your username or email address to reset your password.