How to Index a custom field or ensure it is Primary Key?

Vishwa_Kumar
Level 2

How to Index a custom field or ensure it is Primary Key?

How can I ensure to have an index on a  custom field and make it Primary? My Lookup field is a custom field, will that be as efficient as any other custom field I create or we have to someway create an index on this field?

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: How to Index a custom field or ensure it is Primary Key?

You can't manually index a field. If it's eligible for lookup then it's as efficient as any other.

Vishwa_Kumar
Level 2

Re: How to Index a custom field or ensure it is Primary Key?

What makes a custom field eligible for lookup?

FYI - on my Sandbox environment I am able to  send the lead data using this custom field as lookup.

SanfordWhiteman
Level 10 - Community Moderator

Re: How to Index a custom field or ensure it is Primary Key?

Any custom String, Email, or Integer field is eligible AFAIK. Note it would never be the primary key anyway, you could be thinking about a unique key (which it's not) but in any case the indexing isn't under user control.

Vishwa_Kumar
Level 2

Re: How to Index a custom field or ensure it is Primary Key?

Ok, so just want to be clear, since right now I am only pushing some test data, using a custom field of data type integer as lookup field. It seems to be working fine. But will it be a potential issue when volumes of data will be pushed later, and if there is no indexing or uniqueness on this key, it might slow down or cause any issue?

If there are chances of any issue, what would be recommended solution?

SanfordWhiteman
Level 10 - Community Moderator

Re: How to Index a custom field or ensure it is Primary Key?

The implication is that there's a covered index for each available custom field + the lead ID. Ergo, there may be 2 lookups necessary, but both are indexed.

Vishwa_Kumar
Level 2

Re: How to Index a custom field or ensure it is Primary Key?

I did not get the response clearly. Do you mean I should not worry about indexing or performance, it will be good?

SanfordWhiteman
Level 10 - Community Moderator

Re: How to Index a custom field or ensure it is Primary Key?

Don't worry.