Certified Platform Developer II Exam QuestionsBrowse all questions from this exam

Certified Platform Developer II Exam - Question 210


Users complain that a page is very slow to respond. Upon investigation, the query below is found to perform slowly.

Which two actions can a developer take to improve performance? (Choose two.)

Show Answer
Correct Answer: BD

Improving the performance of the query can be addressed by ensuring that the CustomField_c field is indexed, and one way to include null values in the index is by contacting Salesforce customer support. Making the CustomField_c field required can also ensure better query performance because Salesforce indexes do not normally include null values, and making it required would eliminate null entries.

Discussion

3 comments
Sign in to comment
stan_maltaOptions: CD
Nov 12, 2023

It's not good practice to mark fields as External IDs which are actually not External IDs, and Salesforce Support does create indexes with null values

FriedConsole2000Options: AC
Feb 23, 2024

Answer is A and C. It is fine to create a External Id just for an index.

FriedConsole2000
Feb 23, 2024

Oh I was wrong. https://salesforce.stackexchange.com/questions/367157/custom-indexes-of-null-records#:~:text=By%20default%2C%20the%20index%20tables%20do%20not%20include,rebuild%20them%20to%20get%20the%20empty-value%20rows%20indexed.

FriedConsole2000Options: CD
Feb 23, 2024

https://salesforce.stackexchange.com/questions/367157/custom-indexes-of-null-records#:~:text=By%20default%2C%20the%20index%20tables%20do%20not%20include,rebuild%20them%20to%20get%20the%20empty-value%20rows%20indexed.