exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 307 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 307
Topic #: 1
[All Certified Platform Developer II Questions]

Consider the following queries. For these queries, assume that there are more than 200,000 Account records. These records include soft-deleted records; that is, deleted records that are still in the Recycle Bin. Note that there are two fields that are marked as External Id on the Account. These fields are Customer_Number_c and ERP_Key_c.

Which two queries are optimized for large data volumes? (Choose two.)

  • A. SELECT Id FROM Account WHERE Name != '' AND IsDeleted = false
  • B. SELECT Id FROM Account WHERE Id IN :aListVariable
  • C. SELECT Id FROM Account WHERE Name != '' AND Customer_Number_c = 'ValueA'
  • D. SELECT Id FROM Account WHERE Name != NULL
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
rufusroffie
8 months ago
Selected Answer: BC
A is not good, because isDeleted is not indexed and != ' ' will not use index to search, general you want to avoid field != ' '; any negative comparison is discouraged unless there's second SELECT cause which is indexed; B is good, because you are SELECTing from a range of ID which lower the amount of records it searches; C is good, because even though first clause is bad, second one makes it very Selective because the field is indexed; D is bad because negative comparison is not encouraged
upvoted 4 times
...
AppleDash
8 months ago
BC https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_VLSQ.htm
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago