Redis Zcount 命令

更新时间: 2019-07-07 15:54

Redis Zcount 命令用于计算有序集合中指定分数区间的成员数量。

语法

redis 127.0.0.1:6379> ZCOUNT key min max

返回值

分数值在 min 和 max 之间的成员的数量。

实例

redis 127.0.0.1:6379> ZADD myzset 1 "hello"
(integer) 1
redis 127.0.0.1:6379> ZADD myzset 1 "foo"
(integer) 1
redis 127.0.0.1:6379> ZADD myzset 2 "world" 3 "bar"
(integer) 2
redis 127.0.0.1:6379> ZCOUNT myzset 1 3
(integer) 4

查看更多 Redis 有序集合(sorted set)命令

Algorithms on Strings, Trees and Sequences

Algorithms on Strings, Trees and Sequences

Dan Gusfield / Cambridge University Press / 1997-5-28 / USD 99.99

String algorithms are a traditional area of study in computer science. In recent years their importance has grown dramatically with the huge increase of electronically stored text and of molecular seq......一起来看看 《Algorithms on Strings, Trees and Sequences》 这本书的介绍吧!

HTML 压缩/解压工具

HTML 压缩/解压工具

在线压缩/解压 HTML 代码

XML、JSON 在线转换

XML、JSON 在线转换

在线XML、JSON转换工具

html转js在线工具

html转js在线工具

html转js在线工具