Available in: Redis Stack
Time complexity: O(N*M) when N is the amount of series updated and M is the amount of compaction rules or O(N) with no compaction
Append new samples to one or more time series.
TS.MADD {key timestamp value}...
*
can be used for an automatic timestamp from the server's clock.127.0.0.1:6379>TS.MADD temperature:2:32 1548149180000 26 cpu:2:32 1548149183000 54
1) (integer) 1548149180000
2) (integer) 1548149183000
127.0.0.1:6379>TS.MADD temperature:2:32 1548149181000 45 cpu:2:32 1548149180000 30
1) (integer) 1548149181000
2) (integer) 1548149180000
If a compaction rule exits on a time series, TS.MADD
performance might be reduced.
The complexity of TS.MADD
is always O(N*M) when N is the amount of series updated and M is the amount of compaction rules or O(N) with no compaction.