PREFIX.STATS
Report key-count and byte statistics for a key prefix.
PREFIX.STATS prefix
Complexity
O(keys on the shard) — a full keyspace walk on every shard; the prefix cannot be precomputed
Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.
Redis compatibility
kevy only
kevy has this; Redis does not. nearest is INFO keyspace's db0:keys=N,expires=M — the same two counters, but whole-DB and O(1) off a counter, where ours is per-prefix and therefore O(keyspace)