Skip to content

🔥 Join 600+ readers. Get our newsletter for code and tips.

How to add indexes to the data extensions
962 views

How to add indexes to the data extensions

View favourites

Maybe the title got you a bit curious because there is no such thing as adding indexes in Salesforce Marketing Cloud data extensions. But what can be done instead?

If the indexes cannot be managed by the admins and cannot be requested from support we can try to apply one of the following workarounds.

Filtered data extensions

Every column that is used in a filter (where clause) to create a filtered data extension is automatically indexed in the new filtered data extension.

Adding primary keys

To add indexes, we will have to do so by marking columns as primary keys. A primary key is, so to speak, a type of index and thus it will be indexed

NOTE: Be aware that adding multiple primary keys to the data extension can introduce unwated duplicate rows. As by adding multiple primary keys we are craeting coumpound key.

Relational database model 

Additionally, you can add certain index types by adding the data extension to your relational model, where foreign keys are basically, similarly as primary key, index too.

Salesforce support can make an exception

Salesforce support can make exception and will add index to your data extension when:

  • process is fully optimised and there are still performance issues
  • when using functionality such as ClaimRow() and field cannot be added as primary key in your data extension.

Oh hi there đź‘‹
I have a SSJS skill for you.

Sign up now to get an SSJS skill that can be used with your AI companion

We don’t spam! Read our privacy policy for more info.

Share With Others

The author
Marcel Szimonisz Platinum

Marcel Szimonisz

Marketing Automation Consultant

I specialize in solving marketing technology challenges, automating processes, and turning ideas into practical solutions with Salesforce Marketing Cloud and Adobe Campaign. Through MarTechNotes, I share technical guides and insights that make complex topics easier to understand

Latest badges
Weekend Regular Weekend Regular Profile Complete Profile Complete Simple Start Simple Start 5 Day Streak 5 Day Streak First Comment First Comment

Your email address will not be published. Required fields are marked *

Get exclusive tips, scripts and news

Choose your topics

We don’t spam! Read our privacy policy for more info.

Similar posts

Add to this article

Share your experience

Your contribution

Article history

What changed