zscan.3valkey - Man Page
Iterates over members and scores of a sorted set.
Synopsis
ZSCAN key cursor [MATCH pattern] [COUNT count] [NOSCORES]
Description
See scan(3valkey) for ZSCAN documentation.
Reply
Two-element array.
- The first element is a string that represents an unsigned 64-bit number, the cursor.
- The second element is an array of member/score pairs that were scanned. When
NOSCORESoption is on, a list of members from the sorted set.
Complexity
O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.
Acl Categories
@read @slow @sortedset
History
- Available since: 2.8.0
- Changed in 8.0.0: Added noscores option.
See Also
bzmpop(3valkey), bzpopmax(3valkey), bzpopmin(3valkey), zadd(3valkey), zcard(3valkey), zcount(3valkey), zdiff(3valkey), zdiffstore(3valkey), zincrby(3valkey), zinter(3valkey), zintercard(3valkey), zinterstore(3valkey), zlexcount(3valkey), zmpop(3valkey), zmscore(3valkey), zpopmax(3valkey), zpopmin(3valkey), zrandmember(3valkey), zrange(3valkey), zrangebylex(3valkey), zrangebyscore(3valkey), zrangestore(3valkey), zrank(3valkey), zrem(3valkey), zremrangebylex(3valkey), zremrangebyrank(3valkey), zremrangebyscore(3valkey), zrevrange(3valkey), zrevrangebylex(3valkey), zrevrangebyscore(3valkey), zrevrank(3valkey), zscore(3valkey), zunion(3valkey), zunionstore(3valkey)