Redis 2.8版本标准架构、Redis4.0、5.0标准架构与集群架构均支持 sadd、scard、sdiff、sdiffstore、sinter、sinterstore、sismember、smembers、smove、spop、srandmember、srem、sscan、sunion、sunionstore 命令,而不支持 smismember 命令。
Redis6.2、7.0,及其 ValKey 8.0 标准架构与集群架构均支持 sadd、scard、sdiff、sdiffstore、sinter、sinterstore、sismember、smove、spop、srandmember、srem、sscan、sunion、sunionstore、smismember、 smembers 命令。
集群架构跨 Slot 场景不支持 sdiff、sdiffstore、sinter、sinterstore、smove、sunion、sunionstore 命令。
Redis 7.0版本,及其 ValKey 8.0支持:sintercard。
具体信息,请参见下表。✓ 表示支持,x 表示不支持,- 表示该命令不存在跨 Slot 访问的场景。
命令 | Redis 7.0/ValKey 8.0 标准架构 | Redis 7.0/ValKey 8.0 集群架构 | Redis 6.2标准架构 | Redis 6.2集群架构 | Redis 5.0标准架构 | Redis 5.0集群架构 | Redis 4.0标准架构 | Redis 4.0集群架构 | Redis 2.8标准架构 | 集群架构跨 Slot 支持 |
sadd | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
scard | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
sdiff | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
sdiffstore | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
sinter | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
sinterstore | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
sismember | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
smembers | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
smove | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
spop | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
srandmember | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
srem | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
sscan | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - |
sunion | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
sunionstore | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | x |
smismember | ✓ | ✓ | ✓ | ✓ | x | x | x | x | x | - |
sintercard | ✓ | ✓ | x | x | x | x | x | x | x | - |