Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

TS.INFO

Last updated
TS.INFO key
Group
Time series
Complexity
O(L), L being the labels
Arity
2 (exactly, counting the command name)
Flags
read-only, fast
Keys
first 1, last 1, step 1
HotKV Cloud
Performance and Scale
On-Premise
requires the time-series license feature

TS.INFO describes the time series key.

Field Meaning
key The series name.
totalSamples Samples ever added, including those retention has since dropped.
firstTimestamp Timestamp of the oldest sample kept (0 before the first sample).
lastTimestamp Timestamp of the latest sample (0 before the first sample).
lastValue Value of the latest sample, with six decimals.
retentionMs The retention period, 0 for none.
memoryBytes Memory taken by the samples kept.
labels Array of [label, value] pairs.
rules Number of TS.DOWNSAMPLE rules with this series as the source.

A flat array of 18 elements: each field name (bulk string) followed by its value. The shape is the same in RESP2 and RESP3.

Error replies: ERR series not found, and NOLICENSE ... without the time-series license feature.

127.0.0.1:6379> TS.CREATE temp:kitchen LABELS room kitchen
OK
127.0.0.1:6379> TS.ADD temp:kitchen 1700000000000 21.5
(integer) 1700000000000
127.0.0.1:6379> TS.ADD temp:kitchen 1700000060000 22
(integer) 1700000060000
127.0.0.1:6379> TS.INFO temp:kitchen
1) "key"
2) "temp:kitchen"
3) "totalSamples"
4) (integer) 2
5) "firstTimestamp"
6) (integer) 1700000000000
7) "lastTimestamp"
8) (integer) 1700000060000
9) "lastValue"
10) "22.000000"
11) "retentionMs"
12) (integer) 0
13) "memoryBytes"
14) (integer) 32
15) "labels"
16) 1) 1) "room"
2) "kitchen"
17) "rules"
18) (integer) 0

HotKV’s own time series API. TS.INFO shares its name with the RedisTimeSeries command, but reports a different set of fields.

TS.CREATE, TS.RANGE, TS.LIST