ZSCAN

ZSCAN key cursor [MATCH pattern] [COUNT count]
Available since:
Redis Open Source 2.8.0
Time 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, @sortedset, @slow,
Compatibility:
Redis Software and Redis Cloud compatibility

See SCAN for ZSCAN documentation.

Required arguments

key

The name of the key that holds the sorted set.

cursor

The cursor value. Start an iteration with 0, then use the cursor returned by each call as the argument to the next call.

Optional arguments

MATCH pattern

Only return members matching the given glob-style pattern.

COUNT count

A hint for the number of members to return per iteration. The default is 10.

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
✅ Standard
✅ Active-Active
✅ Standard
✅ Active-Active

Return information

Array reply: cursor and scan response in array form.
RATE THIS PAGE
Back to top ↑