Docs Home → View & Analyze Data → MongoDB Compass
Create a Time Series Collection
On this page
Time series collections efficiently store sequences of measurements over a period of time.
Procedure
Specify a timeField.
Specify which field should be used as the timeField
for the time-series
collection. This field must have a BSON type date.
The following fields are optional:
Field | Description |
---|---|
metaField | The name of the field which contains metadata in each time series
document. The metadata in the specified field should be data that
is used to label a unique series of documents. |
granularity | The The default value is set to |
expireAfterSeconds | The expireAfterSeconds field enables automatic deletion of
documents older than the specified number of seconds. |
For more information on time series fields, see Time Series Collections.
Restrictions and Limitations
The following restrictions and limitations apply when creating a time series collection:
Custom collation is the only Advanced Collection Option that can be used alongside your time series collation.
See Time Series Collection Limitations for all time series collection limitations.