CMS.QUERY
CMS.QUERY key item [item ...]
- Group
- Count-min sketch
- Complexity
- O(n * depth), n being the items
- Arity
- -1 (at least 1 words, counting the command name)
- Flags
- none
- Keys
- first 1, last 1, step 1
- HotKV Cloud
- All plans
- On-Premise
- no license needed
CMS.QUERY returns the estimated count of each item in the Count-min sketch
at key. An estimate is never below the item’s true count, and can be above
it. Items never counted usually report 0.
Return value
Section titled “Return value”An array with one integer per item, the same in RESP2 and RESP3.
Error replies: CMS: key does not exist, and WRONGTYPE if the key holds
another type.
Examples
Section titled “Examples”127.0.0.1:6379> CMS.INITBYDIM pageviews 2000 5OK127.0.0.1:6379> CMS.INCRBY pageviews /home 5 /pricing 11) (integer) 52) (integer) 1127.0.0.1:6379> CMS.QUERY pageviews /home /pricing /blog1) (integer) 52) (integer) 13) (integer) 0Compatibility
Section titled “Compatibility”Same as CMS.QUERY in RedisBloom.
See also
Section titled “See also”Was this page helpful?
Thanks for the feedback.