function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Casey ShockleyCasey Shockley 

Index a custom field?

I've read that I can open a support case to request that a custom field be indexed (for optimizing reporting, etc.) but when I logged a case to do so, I was informed that the Dev Team has to do this, and since we don't have Premier support, they can't take the case.

I saw at least one other person who has had this issue and didn't see a resolution. Is it just not possible to have Salesforce index a field for you anymore if you don't have Premier support? Is it a matter of which support rep you get? Do the folks who monitor these forums have the ability to do this?

Thanks!
AdjasantAdjasant
Hi,

Adding index on Custom Fields by raising a case, is something that a developer do, when the visual force/apex/trigger code they write is taking too much time to load.

One reason for the delay in returing query result in code could be too many records in an object and you are filtering based on a field which is not indexed but business requirements demand that particualr field to be the filter field.

e.g In one of my orgs, I have written some code on Lead object. It worked fine in sandbox and when I moved that to production, it became very slow, Its because the number of leads in production is above 100K and the filter criteria I used is Email Address, which is not indexed by default.

So when we raise a case to add an index, the help desk team first will verify some conditions, like how many records are there in the object, whether query can be improved for better performance without adding index etc... And as the last option, they add an index.

To my knowledge, they don't add index for any out of box reporting purposes.

Let other developers share their experience.

Cheers,
-------------------