Time series commands
The following table lists time series commands. See the command links for more information about each command’s syntax, arguments, and examples.
| Command | Redis Enterprise | Redis Cloud | Description |
|---|---|---|---|
| TS.ADD | ✅ Supported | ✅ Free & Fixed | Appends a sample to a time series. |
| TS.ALTER | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Updates the retention, chunk size, duplicate policy, or labels for an existing time series. |
| TS.CREATE | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Creates a new time series. |
| TS.CREATERULE | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Creates a compaction rule for downsampling. |
| TS.DECRBY | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Decreases the value of the latest sample in a time series by the specified number. Either modifies the existing sample or adds the decreased value as a new sample, depending on the timestamp option. |
| TS.DEL | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Removes all samples between two timestamps for a given time series. |
| TS.DELETERULE | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Removes a compaction rule. |
| TS.GET | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Returns the last sample in a time series. |
| TS.INCRBY | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Increases the value of the latest sample in a time series by the specified number. Either modifies the existing sample or adds the increased value as a new sample, depending on the timestamp option. |
| TS.INFO | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Returns time series information and statistics. |
| TS.MADD | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Appends multiple samples to one or more time series. |
| TS.MGET | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Returns multiple samples with labels that match the filter. |
| TS.MRANGE | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | For multiple time series, runs a query against samples within a range of timestamps, from earliest to latest. Supports filtering and aggregation. |
| TS.MREVRANGE | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | For multiple time series, runs a query against samples within a range of timestamps in reverse order, from latest to earliest. Supports filtering and aggregation. |
| TS.QUERYINDEX | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | Returns the keys of all time series with labels that match the given filters. |
| TS.RANGE | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | From the start of a single time series, runs a query against samples within a range of timestamps. Supports filtering and aggregation. |
| TS.REVRANGE | ✅ Supported | ✅ Flexible & Annual ✅ Free & Fixed | From the end of a single time series, runs a query against samples within a range of timestamps in reverse order. Supports filtering and aggregation. |