<!-- llms-explorer concept facts · https://llms-explorer.com/tree/index-hints-on-time-series-collections/ · pack 2026-10-24 · ~1709 tokens -->

# Index hints on time series collections

> Source-anchored research for Index hints on time series collections. Run status: COMPLETED.

Parent: [MongoDB Time-Series Query and Index Optimization](https://llms-explorer.com/tree/mongodb-time-series-query-and-index-optimization/) · 5 facets · 15 facts · page: https://llms-explorer.com/tree/index-hints-on-time-series-collections/

## How it works

- A hint does not override every eligibility constraint: the query-rewrite README says bounded sort is blocked when unpacking fails to preserve the time/meta fields or a projection modifies sort fields. (low confidence) (verified as of 2026-10-22) — [source](https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/timeseries/README.md)

## How-to and procedures

- Use db.collection.getIndexes() to identify an existing index, then pass its name to find(...).hint("index_name"); a mongosh aggregation accepts the hint as an options field, for example aggregate(pipeline, {hint: "index_name"}). (high confidence) — [source](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-secondary-index.md)

## Problems, failure modes and limitations

- The cursor.hint reference says a nonexistent or hidden index produces an error; it also says index filters can suppress hints and matching cluster query settings containing index hints take precedence over command hints. These are documented hint semantics to check when a time-series hint appears ineffective. (low confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/reference/method/cursor.hint.md)
- Time-series collections do not receive a measurement _id index by default. The limitations guide states that starting in MongoDB 8.3, creating an index named "_id_" or specifying the string hint "_id_" returns an error. This restriction concerns that reserved name and should not be generalized into a prohibition on every index of the _id field. (high confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-limitations.md)
- SERVER-63902 documents find().hint({$natural: 1}) failing on time-series collections in 5.3.0-rc0 with an error saying the hint does not match an existing index. The ticket lists 6.0.0-rc0 as the fix version. This is historical regression evidence, not evidence that current releases reject all natural hints. (low confidence) — [source](https://jira.mongodb.org/browse/SERVER-63902)
- A December 2021 reproducer reports that forcing the time index with hint() did not improve a slow time-series sort-and-limit query. By contrast, a June 2022 Stack Overflow author reports a large subjective improvement after hinting a time-range find query. These uncontrolled reports show workload-dependent outcomes, not comparable performance measurements. (medium confidence) — [source](https://www.mongodb.com/community/forums/t/timeseries-poor-performance-on-indexed-timefield/138016)
- SERVER-58716 records a historical BadValue failure when find used an index-spec hint without translation into bucket-index schema. The issue was resolved on 2022-01-07, but lists no fix version; it cannot establish a supported-release boundary by itself. (low confidence) — [source](https://jira.mongodb.org/browse/SERVER-58716)
- A March 2025 Stack Overflow report shows a date-valued time predicate using ts_1 through bucket control.min.ts/control.max.ts, while numeric epoch-millisecond predicates produced COLLSCAN. The author also reported an existing-index hint error. These are unreproduced observations with no server version, not proof that named hints generally fail. (low confidence) — [source](https://stackoverflow.com/questions/79524211/mongodb-timeseries-query-not-using-index-and-taking-excessively-long)

## Comparisons and alternatives

- The independent study First Past the Post evaluates MongoDB 7.0.1 and reports cases where index scans lose to collection scans. It motivates measuring execution rather than assuming a forced index is faster; the abstract does not establish a benchmark of native time-series hints. (low confidence) — [source](https://arxiv.org/abs/2409.16544)
- MongoDB documentation conflicts on time-series key-pattern hints: the secondary-index guide permits either index names or key patterns, while cursor.hint() says only names are supported. Treat key-pattern portability as unresolved and test the exact server and command rather than asserting a universal restriction. (high confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-secondary-index.md)
- OneUptime demonstrates comparing automatic and hinted execution statistics and warns that a forced index can become worse as data changes. Its examples use ordinary collections; they provide hint-testing methodology rather than independent validation of time-series hint syntax. (low confidence) — [source](https://oneuptime.com/blog/post/2026-03-31-mongodb-hint-force-index/view)

## Facts and statements

- MongoDB’s time-series indexing guide allows hints by index name or key pattern. SERVER-58716 records the completed work to translate logical time-series hint specifications into bucket-index specifications; the ticket does not identify a release version. This supports key-pattern capability but does not resolve the contradictory cursor.hint reference or establish its earliest supported release. (medium confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-secondary-index.md)
- MongoDB’s query-rewrite README gives a metadata-and-time sort as an example where a supporting index must be hinted to obtain bounded sort. The indexing guide also states that some time-series operations need a hint to exploit an index. Treat this as an optimization opportunity to verify on the deployed version. (high confidence) (verified as of 2026-10-22) — [source](https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/timeseries/README.md)
- A successful hint does not eliminate all measurement sorting: bounded sort scans buckets in time order, unpacks them, and interleaves measurements from overlapping buckets. Removing or modifying the required time or metadata sort fields can prevent this optimization. (low confidence) (verified as of 2026-10-22) — [source](https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/timeseries/README.md)
- Compare the same query with and without a hint using explain("executionStats"). Inspect the selected index and scan work, documents examined, elapsed time, bucket unpacking, and sort stages before retaining the hint; selecting an index alone is insufficient evidence of improvement. (medium confidence) — [source](https://www.mongodb.com/docs/manual/core/timeseries/timeseries-secondary-index.md)
