kevy

SCAN

Iterate the keyspace incrementally: each call walks ~COUNT buckets of one shard and returns the next cursor.

SyntaxSCAN cursor [MATCH pattern] [COUNT count] [TYPE type]
Groupscan
Arity-2
Since4.0.0
Flagsreadonly
ComplexityO(COUNT) buckets per call, amortised O(N) for a full sweep — reverse-binary cursor, rehash-tolerant (a key present for the whole sweep is returned at least once even across table growth)
Redis compatibilitydiffers: cursors encode (shard, position), so a cursor is only valid on the server and shard count that issued it — the same per-node property Redis Cluster cursors have. MATCH and TYPE filter after collection; COUNT bounds the buckets visited, not the keys returned

← All commands