nerdexam
Salesforce

PDII · Question #232

A developer receives the exception 'SOQL query not selective enough' when performing a query on an object with a large amount of data. Which step should be taken to resolve the issue?

The correct answer is D. Use an ID in the WHERE clause of the SOQL query. See the full explanation below for the reasoning.

Question

A developer receives the exception 'SOQL query not selective enough' when performing a query on an object with a large amount of data. Which step should be taken to resolve the issue?

Options

  • APerform the SOQL query via a call to the REST API
  • BPerform the SOQL query as part of a FOR loop
  • CMove the SOQL query to within an asynchronous process
  • DUse an ID in the WHERE clause of the SOQL query

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    4% (1)
  • D
    83% (20)

Community Discussion

No community discussion yet for this question.

Full PDII Practice