---
schema_version: "1"
id: 76371f8ae243cb707d3e9e5bd0d3a285125ebd438ac5091197f5b1c98affab56
title: Add an Index to a Big Object
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/custom_bo_index.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.custom_bo_index.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 821c15d2194d80e0a749e3517926e9306248606139fb1df0b61eb80ffd684eaa
description: The index defines the composite primary key for a custom big object and is used for querying and filtering the big object data. Each big object requires an index.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Add an Index to a Big Object

The index defines the composite primary key for a custom big object and is used for querying and filtering the big object data. Each big object requires an index.

To create an index, you must have at least one required custom field defined on the big object. See [Considerations When Creating an Index](https://help.salesforce.com/s/articleView?id=platform.custom_bo_considerations.htm&release=264.0.0&type=5 "Plan carefully when creating an index for your custom big object. The index is used for querying and filtering the big object data and must be designed properly.") for more details.

1. From the Index section of a big object detail page, click **New**. This button displays only if the big object has at least one required custom field.
2. Add a Label and Name for the index.
    
    ![Warning](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_warning.png)
    
    Warning When querying a big object record via SOQL and passing the results as arguments to the delete API, if any index field name has a leading or trailing white space, you can't delete the big object record.
3. For each custom field listed, set the Index Position and Index Direction. The order in which you define the fields determines the order that they’re listed in the index. Set the Index Position to **1** for the most frequently used filter parameter.
    
    ![Big Object Index Definition](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/extend_click/images/setup_custom_bo_index.png)
4. Save the index.