Docs Menu

Time Series Collection Limitations

On this page

The maximum size of a measurement document is 4 MB.

Time series collections only support insert operations and read queries. Updates and manual delete operations result in an error.

To automatically delete old data, set up automatic removal (TTL).

To remove all documents from a collection, use the drop() method to drop the collection.

You can add secondary indexes on the fields specified as the timeField and the metaField. If the field value for the metaField field is a document, you can also create secondary indexes on fields inside that document.

The metaField doesn't support the following index types:

Secondary indexes don't support the following index properties:

The reIndex command is not supported for time series collections.

A time series collection can't be created as a capped collection.

A collection's type can only be set when creating the collection:

To move data from an existing collection to a time series collection, migrate data into a time series collection.

You can only set a collection's timeField and metaField parameters when creating the collection. After creation these parameters can't be modified.

Once the granularity is set it can only be increased by one level at a time. From "seconds" to "minutes" or from "minutes" to "hours". Other changes are not allowed. If you need to change the granularity from "seconds" to "hours", first increase the granularity to "minutes" and then to "hours".

You cannot specify validation rules for time series collections.

Client-side field level encryption is not supported for time series collections.

Time series collections cannot currently be sharded.

The aggregation pipeline stages $out and $merge can't output to time series collections.

You can't write to time series collections in transactions.

Note

Reads from time series collections are supported in transactions.

Change streams are not supported for time series collections.

Database Triggers are not supported for time series collections.

GraphQL API is not supported for time series collections.

Atlas Search is not supported for time series collections.

Realm Sync is not supported for time series collections.

Give Feedback
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.