In our ISV package we had to "convert" a pre-indexed Lookup field to a Text(255) field as we wanted to keep Ids even when the referenced record was deleted.
After we did that the performance of SOQL queries which filter on this field dramatically decreased. Some batches aborted as the query was doing a full-table scan.
I know Salesforce Support will on request add a filter on this field for specific customer orgs. But I am looking into a way to solve this for all orgs of our managed package.
- Is there a way to make an existing field an external Id afterwards?
- Have you been successful asking Support for doing this?
- What was their response?
EDIT: I have found this idea which looks like this is not at all possible, but I don't understand why Salesforce should prevent ISVs from adding an index afterwards. This doesn't seem to corrupt exiting data, does it? 4. Is there any downside to use External Ids instead of Custom Indexes by Salesforce regarding performance and selectivity?