<!-- llms-explorer concept facts · https://llms-explorer.com/tree/partial-and-ttl-indexes-on-time-series/ · pack 2026-10-22 · ~1056 tokens -->

# Partial and TTL indexes on time series

> Source-anchored research for Partial and TTL indexes on time series. Run status: COMPLETED.

Parent: [MongoDB Time-Series Query and Index Optimization](https://llms-explorer.com/tree/mongodb-time-series-query-and-index-optimization/) · 3 facets · 9 facts · page: https://llms-explorer.com/tree/partial-and-ttl-indexes-on-time-series/

## How it works

- A partial index includes only documents that match its partialFilterExpression. This can reduce index storage and maintenance, but MongoDB can use the index only when the query condition guarantees that all matching documents are represented; otherwise the index could produce incomplete results. (high confidence) — [source](https://www.mongodb.com/docs/manual/core/index-partial.md)

## Problems, failure modes and limitations

- Time-series TTL cleanup is bucket-oriented: MongoDB removes a bucket after all measurements in it expire, using the bucket's upper timestamp limit plus expireAfterSeconds. The TTL monitor runs periodically, so expiration makes data eligible for deletion but does not guarantee immediate removal. (high confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/core/index-ttl/)
- Percona Backup for MongoDB 2.17.0 warns that its logical restore and point-in-time recovery can fail when TTL cleanup removes expired time-series buckets needed for oplog replay. The warning covers collections configured with expiration and does not specifically test partial TTL filters. (medium confidence) (verified as of 2026-10-06) — [source](https://docs.percona.com/percona-backup-mongodb/2.17.0/features/known-limitations.html)

## Facts and statements

- A partial TTL index on a time-series collection uses the collection's timeField as its TTL key and restricts partialFilterExpression to the collection's metaField. The filter selects which metadata-matched measurements qualify for expiration. (high confidence) — [source](https://www.mongodb.com/docs/manual/core/index-ttl/)
- If a time-series collection has no collection-level expireAfterSeconds, a partial TTL index sets expiration for matching measurements only. If the collection already has a TTL, the partial TTL can set a shorter period for matching measurements. A shorter collection-level TTL expires data first, so a longer partial TTL has no effect. (high confidence) — [source](https://www.mongodb.com/docs/manual/core/index-ttl/)
- MongoDB's 7.0 compatibility notes and current server README place time-series partial TTL support in Rapid Release 6.3, and Mydbops also describes it as a 6.3 feature. The versioned 7.0 time-series index guide labels TTL indexes with partial filters as new in 7.0. Treat the labels as inconsistent and verify support against the exact server build. (high confidence) (verified as of 2026-10-20) — [source](https://www.mongodb.com/docs/manual/release-notes/7.0-compatibility.md)
- Before downgrading below MongoDB 6.3, remove partial TTL indexes from time-series collections. MongoDB's compatibility notes require removal, and Mydbops reports that an FCV 6.0 downgrade is rejected while such an index remains. (high confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/release-notes/7.0-compatibility.md)
- MongoDB time-series collections support partial indexes starting in 6.0. The time-series index manual lists $or, $in, and $geoWithin among supported operators and disallows partial indexes on the collection metaField and timeField. (high confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-index.md)
- A time-series partial TTL index uses the collection timeField as its index key and allows a partialFilterExpression only on the metaField. Without collection-level expireAfterSeconds, it sets an expiration period for matching measurements; with collection-level retention, it can shorten retention for matching measurements. If the partial TTL period is longer than the collection-level period, the collection-level TTL expires the data first. (high confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-index.md)
