Database Manual / Time Series / Create & Configure

Migrate Data into a Time Series Collection将数据迁移到时间序列集合中

If your collection stores data that you want to compare across time intervals, use a time series collection to improve performance and storage. For more information on the benefits of time series collections, see Time Series Collections.如果集合存储了要跨时间间隔进行比较的数据,请使用时间序列集合来提高性能和存储。有关时间序列集合好处的更多信息,请参阅时间序列集合

You can use the following methods to migrate data from an existing collection into a time series collection:您可以使用以下方法将数据从现有集合迁移到时间序列集合中:

Considerations注意事项

If you use MongoDB 7.0 or greater and already have your data in a MongoDB database, migrate with an aggregation pipeline.如果您使用MongoDB 7.0或更高版本,并且已经将数据存储在MongoDB数据库中,请使用聚合管道进行迁移。

If your data is in a relational database, use Relational Migrator to migrate your data into a time series collection.如果数据位于关系数据库中,请使用relational Migrator将数据迁移到时间序列集合中。

If your deployment is not in one of those cases, use Database Tools to migrate your data.如果部署不是上述情况之一,请使用数据库工具迁移数据。