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.)
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.)
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.
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
Answer is A and C. It is fine to create a External Id just for an index.
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.
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.