Data 360
Data 360 secondary indexes: benchmark the right query
Evaluate Data 360 secondary indexes with supported objects, selective filters, refresh freshness and total operating cost in view.
An index is useful only when your query can use it. Start with the slow query and its filter, then check whether the data object qualifies.
Salesforce documents secondary indexes for Data Lake Objects and supported materialised Data Model Objects. The feature does not apply uniformly to zero-copy data, unstructured data or non-materialised views. Confirm the supported object and source configuration before designing a production dependency.
A selective equality filter on a field with many distinct values is a sensible candidate to investigate. A query that wraps that field in a function, performs a fuzzy match, or returns most of the dataset may not benefit in the same way. An index cannot correct an unnecessarily broad business question.
Capture the query text, parameter values, data volume and result set before changing anything. Record normal variation across repeated runs. Choose representative values, including one that matches many rows and one that matches none. A single unusually fast result does not establish a performance improvement.
Include freshness in the benchmark
Secondary indexes have a refresh process. Salesforce describes a batch-transform-based setup with scheduled incremental refresh and a daily default. The interval you choose creates a tradeoff between freshness and consumption.
After building the index, insert or change a test record through the supported data path. Run the query before and after refresh. Record when the expected result appears. Your acceptance criteria should include whether that delay is tolerable for the workflow.
Keep the benchmark small enough to explain:
- Compare the same query and parameters before and after indexing.
- Confirm identical expected results once the index is current.
- Test fresh updates and document the interval before they appear.
- Measure storage, refresh consumption and query behaviour together.
- Check each relevant mapped DLO when the query runs through a DMO.
Do not publish a percentage improvement until it comes from your own representative workload. Performance depends on data distribution, query shape and the rest of the execution plan. Vendor feature availability is not a benchmark for your org.
Give the index an owner and a removal rule. If the application stops using the indexed field, the refresh process may continue consuming resources without serving a useful query. Review usage when the data model or application changes.
For a latency-sensitive agent action, decide what happens when the freshest record is not yet queryable. A clear “data is still refreshing” response is safer than presenting stale results as a current operational fact.