CLUSTER COUNTKEYSINSLOT

Syntax
CLUSTER COUNTKEYSINSLOT slot
Available since:
3.0.0
Time complexity:
O(1)
ACL categories:
@slow,

返回指定Redis集群哈希槽中的键的数量。该命令仅查询本地数据集,因此联系不服务于指定哈希槽的节点将始终返回零计数。

> CLUSTER COUNTKEYSINSLOT 7000
(integer) 50341

RESP2/RESP3 回复

Integer reply: The number of keys in the specified hash slot, or an error if the hash slot is invalid.
RATE THIS PAGE
Back to top ↑