nerdexam
Salesforce

PDI · Question #59

The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records: Which governor limit will likely be exceeded within the Apex transaction?

The correct answer is C. Total number of records retrieved by SOQL queries. When an Apex method queries a large number of records from an object like Lead, the "Total number of records retrieved by SOQL queries" governor limit can be exceeded if the query attempts to fetch more than 50,000 records in a single transaction.

Submitted by layla.eg· Apr 18, 2026Logic and Process Automation

Question

The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?

Exhibit

PDI question #59 exhibit

Options

  • ATotal number of DML statement issued
  • BTotal number of SOQL queries issued
  • CTotal number of records retrieved by SOQL queries
  • DTotal number of records processed as a result of DML statements

How the community answered

(30 responses)
  • A
    17% (5)
  • B
    7% (2)
  • C
    73% (22)
  • D
    3% (1)

Why each option

When an Apex method queries a large number of records from an object like Lead, the "Total number of records retrieved by SOQL queries" governor limit can be exceeded if the query attempts to fetch more than 50,000 records in a single transaction.

ATotal number of DML statement issued

Executing a SOQL query does not involve DML (Data Manipulation Language) statements, so the limit on the total number of DML statements issued would not be affected.

BTotal number of SOQL queries issued

A single SOQL query, regardless of the number of records it retrieves, only counts as one SOQL query against the limit of 100 SOQL queries issued.

CTotal number of records retrieved by SOQL queriesCorrect

The governor limit for the total number of records retrieved by SOQL queries is 50,000. If the Lightning web component executes an Apex method that performs a SOQL query to fetch all lead records and the environment contains more than 50,000 leads, this limit will be exceeded.

DTotal number of records processed as a result of DML statements

The limit on the total number of records processed as a result of DML statements applies to DML operations (insert, update, delete, upsert), not to SOQL queries.

Concept tested: SOQL governor limits (records retrieved)

Source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm

Topics

#Governor Limits#SOQL#Apex#Large Data Volumes

Community Discussion

No community discussion yet for this question.

Full PDI Practice