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.

CMS.INFO

Last updated
CMS.INFO key
Group
Count-min sketch
Complexity
O(1)
Arity
-1 (at least 1 words, counting the command name)
Flags
fast
Keys
first 1, last 1, step 1
HotKV Cloud
All plans
On-Premise
no license needed

CMS.INFO returns the dimensions of the Count-min sketch at key and the total of all increments it has counted.

Field Meaning
width Counters per row.
depth Number of rows.
count Sum of all increments (after a CMS.MERGE, the weighted sum of the sources’ counts).
Case RESP2 RESP3
Sketch exists Flat array of field names and integer values Map

Error replies: CMS: key does not exist, and WRONGTYPE.

127.0.0.1:6379> CMS.INITBYDIM pageviews 2000 5
OK
127.0.0.1:6379> CMS.INCRBY pageviews /home 3 /pricing 1
1) (integer) 3
2) (integer) 1
127.0.0.1:6379> CMS.INFO pageviews
1) width
2) (integer) 2000
3) depth
4) (integer) 5
5) count
6) (integer) 4

Same as CMS.INFO in RedisBloom.

CMS.INITBYDIM, CMS.INITBYPROB, CMS.QUERY