Which two methods are best practice to implement heap size control for the above code?

As a part of class implementation a developer must execute a SOQL query against a large data ser based on the contact object.

The method implementation is as follows.

Which two methods are best practice to implement heap size control for the above code? (Choose 2 Answers)
A . Use the FOR UPDATE option on the SOQL query to lock down the records retrieved.
B . Use visual keyword when declaring the retrieve variable.
C . Use a SOQL FOR loop, to chunk the result set in batches of 200 records.
D . Use WHERE clauses on the SOQL query to reduce the number of records retrieved.

Answer: B,C

Latest PDI Practice Questions with 191 Q&As

Updated Study Material | Instant Download | Detailed Answers and Explanations

Subscribe
Notify of
guest
1 Comment
Rajesh
Rajesh
3 years ago

C and D is the right option