天天看點

ZCOUNT key min max

傳回有序集key中,score值在min和max之間(預設包括score值等于min或max)的成員。 關于參數min和max的詳細使用方法,請參考ZRANGEBYSCORE指令。

Note: the command has a complexity of just O(log(N)) because it uses elements ranks (see <code>ZRANK</code>) to get an idea of the range. Because of this there is no need to do a work proportional to the size of the range.

##傳回值

integer-reply: 指定分數範圍的元素個數。

##例子

本文作者:陳群

本文來自雲栖社群合作夥伴rediscn,了解相關資訊可以關注redis.cn網站。