Which fields to index




















The following query can use the index on the location field:. Although the query can use the index, the result set does not include the sample document above. When performing equality matches on embedded documents, field order matters and the embedded documents must match exactly. See Query Embedded Documents for more information regarding querying on embedded documents. For more information on the index build process, see Index Builds on Populated Collections , including the Index Builds in Replicated Environments section.

Some drivers may specify indexes, using NumberLong 1 rather than 1 as the specification. This does not have any affect on the resulting index. Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between.

It only takes a minute to sign up. Connect and share knowledge within a single location that is structured and easy to search. 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.

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:. The following fields are indexed by default: primary keys Id, Name and Owner fields , foreign keys lookup or master-detail relationship fields , audit dates such as LastModifiedDate , and custom fields marked as External ID or Unique.

That line answers both the "by default" and "under what conditions custom fields" aspects of your question. That's it. Some additional information about which fields are automatically indexed and exceptions for those which cannot be indexed is available in the Best Practices for Deployments with Large Data Volumes PDF architecture documentation. In addition to a ton of other great stuff. Salesforce also supports custom indexes on custom fields, with the exception of multi-select picklists, text area long , text area rich , non-deterministic formula fields, and encrypted text fields.

External IDs cause an index to be created on that field, which is then considered by the Force. To create custom indexes for other field types, including standard fields, contact salesforce.

Just found that salesforce has posted a cheat sheet with much more data about indexing than I've ever seen before. One big takeaway is that there are some substantial differences between performance of standard and custom indexes. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. What standard and custom fields are indexed?

Ask Question. Asked 9 years, 3 months ago. Active 3 years, 5 months ago. Custom indexes can be requested on both standard and custom fields by creating a case with Salesforce Support. Did you find it helpful? Yes No. Visit our forums to search for answers, or post your own questions. Solution home App Resources Salesforce.

Sorry we couldn't be helpful. Help us improve this article with your feedback. Related Articles.



0コメント

  • 1000 / 1000