sinter

英 ['sɪntə]   美 ['sɪntə]  

n.泉华,烧结物,熔渣

vt.使烧结

store

英 [stɔ:(r)]   美 [stɔr, stor]  

n.商店;贮存物;仓库;大量

v.贮存;(在计算机里)存储

第三人称单数: stores 复数: stores 现在分词: storing 过去式: stored 过去分词: stored

redis SINTERSTORE命令 语法

作用:这个命令类似于 SINTER 命令,但它将结果保存到 destination 集合,而不是简单地返回结果集。

语法:SINTERSTORE destination key [key ...]

说明:如果 destination 集合已经存在,则将其覆盖。destination 可以是 key 本身。

可用版本:>= 1.0.0

时间复杂度:O(N * M), N 为给定集合当中基数最小的集合, M 为给定集合的个数。

返回:结果集中的成员数量。

redis SINTERSTORE命令 示例

redis> SMEMBERS songs
1) "good bye joe"
2) "hello,peter"
redis> SMEMBERS my_songs
1) "good bye joe"
2) "falling"
redis> SINTERSTORE song_interset songs my_songs
(integer) 1
redis> SMEMBERS song_interset
1) "good bye joe"