Courseiva

SF-Data-Arch Large Data Volume Considerations Practice Question

A Salesforce org has a custom object Shipment__c with 12 million records. Users frequently run a SOQL query that filters on Status__c and Order_Date__c, and sorts by CreatedDate. The query is timing out. The org has an index on Status__c and a custom index on Order_Date__c. What is the most likely reason the query is still slow?

⚠ Common exam trap

The trap here is assuming that having indexes on individual fields guarantees query performance, when the real determinant is whether the combined filters meet the selectivity threshold for that object's size.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

The query is non-selective because the combination of filters does not reduce the result set below the selectivity threshold, and sorting by CreatedDate requires additional processing.

For a 12-million-record object, selectivity is the critical factor. Salesforce uses a threshold based on object size to decide whether to use an index. Even with indexes on Status__c and Order_Date__c, if the filters return too many rows, the optimizer performs a full scan. Sorting by CreatedDate adds overhead. The correct diagnosis is that the query is non-selective and the sort compounds the cost.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    The query is slow because it sorts by CreatedDate, which is not indexed, and Salesforce cannot sort large result sets without an index on the sort field.

    Why it's wrong here

    Salesforce can sort query results without an index on the sort field, but it may require additional processing. The absence of an index on CreatedDate is not the primary cause; the main issue is the selectivity of the filters. If the filters were selective, the sort would operate on a smaller set. This option misidentifies the root cause and overstates the impact of sorting.

  • ✓

    The query is non-selective because the combination of filters does not reduce the result set below the selectivity threshold, and sorting by CreatedDate requires additional processing.

    Why this is correct

    Salesforce selectivity thresholds depend on the object size; for 12 million records, a query must filter to a small percentage to use an index. Even with indexes on Status__c and Order_Date__c, if the filters are not restrictive enough, the optimizer may choose a full scan. Sorting by CreatedDate adds a sort operation that can further degrade performance when the result set is large. This combination explains the timeout.

  • ✗

    The custom index on Order_Date__c is not used because Salesforce does not support custom indexes on date fields.

    Why it's wrong here

    Salesforce does support custom indexes on date fields, including Date and DateTime. The limitation is on fields like multi-select picklists or formula fields, not dates. Therefore, the custom index on Order_Date__c can be used if the query is selective enough. This option states an incorrect platform limitation and does not address the actual selectivity issue.

  • ✗

    The query is slow because Status__c is a picklist field, and picklist fields cannot be indexed.

    Why it's wrong here

    Picklist fields can be indexed in Salesforce; standard indexes are automatically created for external ID fields and some standard fields, and custom indexes can be requested for picklist fields. The statement that picklist fields cannot be indexed is false. The real problem is that the combination of filters may not be selective enough for the object size, leading to a full scan.

About these practice questions

Courseiva writes every SF-Data-Arch question from scratch — 222 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Salesforce exam blueprint

This SF-Data-Arch practice question is part of Courseiva's free Salesforce certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SF-Data-Arch exam.