Salesforce Marketing Cloud, SFMC Tips & Tricks

How to add indexes to the data extensions

Salesforce Marketing Cloud Tips

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 FREE e-book for you.

Sign up now to get an in-depth analysis of Adobe and Salesforce Marketing Clouds!

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

#SQL
Marcel Szimonisz
Marcel Szimonisz
MarTech consultant As a marketing automation consultant, I specialize in solving problems, automating processes, and driving innovation in my clients' marketing platforms.

I hold certifications in Adobe Campaign v6 (3x certified) and Salesforce Marketing Cloud (5x certified).

Additionally, I serve as a community advisor for Adobe Campaign, offering expert insights and guidance.

In addition to my professional pursuits, I also enjoy exploring various programming languages, CMSs, and frameworks, further enhancing my technical expertise and staying at the forefront of industry advancements.
Take a look at our subscription offering in case you are looking for a Marketing Automation Consultant.

Leave a comment

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

Similar posts that you may find useful

SFMC tips and tricks
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

SFMC TIP | Open a case

less than a minute read

As the title says open a case every time you experience issue or some feature you used on another instance and now is gone. Why open a case? For example when you automation fails with detailed error “Error has occurred”. Simple solution is to “open a case”. Support will tell you exactly what happened. You […]

Continue reading
SFMC tips and tricks
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

Error updating filter and new data extension

less than a minute read

If you’re using Email Studio in Salesforce Marketing Cloud and receive an ‘Error: updating filter’ message when creating a new Data Extension, it’s likely because the name you’ve chosen already exists. This error message can be misleading, but a simple solution is to rename the Data Extension with a more unique identifier. Make sure to […]

Continue reading
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

The Top 5 Stress-Busting Tips I have Learnt

3 minutes read

Working with any marketing automation platform, especially Salesforce Marketing Cloud, can provide a great user experience and a sense of accomplishment. However, it can also entail many stressful hours dedicated to solving seemingly easy issues. Here are my top 5 tips that made my daily work less stressed and saved me lots of cursing this […]

Continue reading
Salesforce Marketing Cloud Tips
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

How to use MD5 in SQL and AMPScript

1 minute read

Message Digest 5 (MD5) is a hash function used for data integrity, but it is not suitable for security-critical applications. It has found use for various applications, one of which is to create an encrypted contact subscriber key. MD5 takes any string and produces a fixed-size (128-bit) hash value, that cannot be easily decrypted. To […]

Continue reading
Salesforce Marketing Cloud Tips
Marketing Automation, Salesforce Marketing Cloud, SFMC Tips & Tricks

Cannot add attributes to data extension

less than a minute read

Occasionally, as a Salesforce Marketing Cloud administrator, lurker, practitioner, or bystander, you encounter a seemingly simple yet potentially time-consuming task—adding attributes to a data extension. While it may sound straightforward, the process is not always as simple as it appears. When adding or editing data extension attributes in Salesforce Marketing Cloud, you may face a […]

Continue reading