Courseiva
Performance →mediumMultiple Choice

SF-PD2 Performance Practice Question

A developer needs to update a field on 50,000 child records based on a change in a parent Account. What is the most performant way to handle this update?

⚠ Common exam trap

Many candidates incorrectly select Queueable Apex or standard trigger logic for massive updates of 50,000 records, forgetting that Batch Apex is specifically built for large volume data processing.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Implement a Batch Apex class to update in chunks.

Updating 50,000 records requires careful consideration of governor limits. Batch Apex is designed specifically for this use case, as it processes records in chunks, managing the governor limits for each batch independently. This ensures the transaction does not exceed heap, DML, or CPU limits, providing a robust and reliable way to perform mass data updates without interrupting normal system operations or causing timeouts.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Use a trigger to perform the update synchronously.

    Why it's wrong here

    Performing 50,000 DML operations synchronously in a trigger will immediately exceed governor limits and cause the transaction to fail. Triggers are meant for near-instant validation or light updates; they are not designed for large-scale data manipulation which requires asynchronous processing to succeed without hitting platform limits.

  • ✓

    Implement a Batch Apex class to update in chunks.

    Why this is correct

    Batch Apex processes the 50,000 records in smaller, manageable chunks, typically 200 at a time. This keeps the execution within the governor limits for each batch, allowing the entire job to complete successfully without hitting the DML limit or exhausting the CPU time allocated to a single transaction.

  • ✗

    Use a flow with a loop and record update element.

    Why it's wrong here

    Flows are not designed to process 50,000 records in a single execution. The loop element will hit governor limits very quickly, and the bulk update element will fail if it attempts to update too many records at once without proper batching, leading to transaction failure and potential data inconsistency.

  • ✗

    Use the @future method in a recursive loop.

    Why it's wrong here

    Recursive @future calls are restricted by the platform and can lead to governor limit exhaustion. Furthermore, @future methods are not designed for mass record processing. Implementing this would likely result in runtime errors and is considered an anti-pattern when compared to the robust Batch Apex framework.

About these practice questions

One of 226 original SF-PD2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Salesforce exam blueprint

This SF-PD2 practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-PD2 exam.