What standard and custom fields are indexed?

  • I'm trying to find a proper list of what standard fields are indexed by default in salesforce, as well as under what conditions custom fields are indexed.

    To start things off I know fields are indexed:

    • When salesforce has added a custom index at your request (but you can't rely on this in other orgs)
    • Any fields marked as external IDs
    • Master-Detail fields
    • Lookup fields
    • System audit fields (CreatedDate, SystemModStamp)

    I've asked salesforce support and there is no authoritative documentation on this outside of this page: http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_SOQL_VLSQ.htm

    Would you consider the Id field as being indexed or just the primary key? Probably not what you were looking for. I suspect many of the limits in place are driven by underlying indexes. Such as the number of formula or validation rule references you can have.

    One omission from your list I can see is the Id field of all objects

  • zachelrath

    zachelrath Correct answer

    6 years ago

    As of the Spring 15 release of Salesforce, the easiest way to see which fields on a given object are indexed is to check for a "check" in the "Indexed" column in the list of an object's fields in Setup:

    Indexed Column in Object Fields list

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM

Tags used