Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 315 discussion

Actual exam question from Salesforce's CRT-450
Question #: 315
Topic #: 1
[All CRT-450 Questions]

A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the database.

Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits? (Choose two.)

  • A. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.
  • B. Use partial DML statements to ensure only valid data is committed.
  • C. Use the System.Limit class to monitor the current CPU governor limit consumption.
  • D. Use the Database.Savepoint method to enforce database integrity.
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Keiyo
1 year, 2 months ago
C. Using the System.Limit class to monitor the current CPU governor limit consumption can indeed help you keep track of your governor limits during execution. It's a valuable debugging and monitoring technique. D. Using the Database.Savepoint method to enforce database integrity is a valid approach to ensuring data consistency and integrity within a transaction. Savepoints allow you to set points within your transaction and roll back to those points if necessary.
upvoted 1 times
...
irina_735
1 year, 2 months ago
Selected Answer: CD
Database.Savepoint provides transaction control but partial DML don`t
upvoted 3 times
...
DonAldos
1 year, 7 months ago
Selected Answer: BD
Its B & D
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...