# Selective queries, indexes and skinny tables

*Platform Data Architect Study Guide · Large Data Volume Considerations · Last updated October 26, 2026 · https://www.certifyforce.com/study-guide/platform-data-architect/large-data-volume-considerations/selective-queries-indexes-and-skinny-tables*

How the query optimizer decides whether an index is used, which fields can and can't be indexed, and when two-column indexes, skinny tables, divisions, parent-record summaries and batch Apex keep a multi-million-row org fast.

- Certification: Salesforce Platform Data Architect
- Exam section: Large Data Volume Considerations
- Study guide: https://www.certifyforce.com/study-guide/platform-data-architect

**Official exam objective:**

> Given a customer scenario, design a data model that scales considering LDV and solution performance.

## What the exam expects

- Apply the standard and custom index thresholds to a row count to decide whether a filter is selective.
- Fix non-selective filters: nulls, negative operators, non-deterministic formulas, OR clauses, FirstName/LastName.
- Choose a custom index, two-column index, skinny table or divisions, and know which need Salesforce Customer Support.
- Design reports and parents for scale, process millions of rows with batch Apex, and speed Full sandbox copies.

Key terms: **selective filter** (an indexed filter under the optimizer's threshold); **query optimizer** (pre-queries index statistics to pick an access path); **non-deterministic formula** (one whose value can change without the record changing); **skinny table** (a Support-built table holding a subset of one object's fields); **division** (a Support-enabled partition of large data sets).

## Key facts

| Fact | Detail | Source |
|---|---|---|
| Standard index threshold | Under 30% of the first million records and 15% of the rest, capped at 1,000,000 | [Indexes](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-indexes.html), [Query Plan Tool FAQ](https://help.salesforce.com/s/articleView?id=000386864&language=en_US&type=1) |
| Custom index threshold | Under 10% of the first million records and 5% of the rest, capped at 333,333 | [Indexes](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-indexes.html), [Query Plan Tool FAQ](https://help.salesforce.com/s/articleView?id=000386864&language=en_US&type=1) |
| External ID field types | Auto Number, Email, Number, Text; marking one creates an index | [Indexes](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-indexes.html) |
| No custom index | Multi-select picklist, multicurrency currency, long text, binary, some formulas | [Very Large SOQL Queries](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_VLSQ.htm) |
| Optimizer statistics | Gathered nightly after large API data changes | [Database Statistics](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-database-statistics.html) |
| Skinny table limits | 200 columns, one object only, copied to Full sandboxes (other types need Support) | [Skinny Tables](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-skinny-tables.html) |
| Divisions prerequisite | Over one million records in one object and more than 35 licenses | [Divisions](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-divisions.html) |
| Batch Apex QueryLocator | Bypasses the SOQL row limit, up to 50 million records | [Use Batch Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm) |

## Check yourself

- Why can't Support add a custom index to a formula that uses TODAY()?
- When is a two-column custom index better than two single-column indexes?
- Why should a report total child amounts from a field on the parent rather than summarizing the children?
- What must happen before an admin can add a field to an existing skinny table?

## Sources

- [Indexes (Large Data Volumes)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-indexes.html)
- [SOQL and SOSL (Large Data Volumes best practices)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-best-practices-soql-and-sosl.html)
- [Using SOQL and SOSL (Large Data Volumes techniques)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-techniques-using-soql-and-sosl.html)
- [Skinny Tables (Large Data Volumes)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-skinny-tables.html)
- [Working with Very Large SOQL Queries](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_SOQL_VLSQ.htm)
- [Reporting (Large Data Volumes best practices)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-best-practices-reporting.html)
- [General (Large Data Volumes best practices)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-best-practices-general.html)
- [Divisions (Large Data Volumes)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-divisions.html)
- [Database Statistics (Large Data Volumes)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-infrastructure-database-statistics.html)
- [Use Batch Apex](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_batch_interface.htm)
- [Trailhead: Conduct Data Queries and Searches](https://trailhead.salesforce.com/content/learn/modules/large-data-volumes/conduct-data-queries-and-searches)
- [Trailhead: Design Your Data Model](https://trailhead.salesforce.com/content/learn/modules/large-data-volumes/design-your-data-model)
- [Introduction (Large Data Volumes)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-introduction.html)
- [Best Practices (Large Data Volumes)](https://developer.salesforce.com/docs/platform/salesforce-large-data-volumes-bp/guide/ldv-deployments-best-practices.html)
- [Developer Console Query Plan Tool FAQ](https://help.salesforce.com/s/articleView?id=000386864&language=en_US&type=1)

## About the full unit

The "Core concepts", "Exam traps" and "Worked scenario" sections of this unit, its 20 linked practice questions, and unlimited timed mock exams are included with the Platform Data Architect pack (USD $19): https://www.certifyforce.com/practice-exams
