redis SDIFFSTORE command


  Translation results:

diff

UK['dɪf] US['dɪf]

abbr.differential differential (of);difference different;differ different;differentiator differentiator

store

UK[stɔ:(r)] US[stɔr, stor]

n. Store; storage; warehouse; large quantity

v. Storage; (in a computer) storage

Third person singular: stores Plural: stores Present participle: storing Past tense: stored Past participle: stored

redis SDIFFSTORE commandsyntax

Function:The function of this command is similar to SDIFF, but it saves the results to the destination collection instead of simply returning the result set.

Syntax: SDIFFSTORE destination key [key ...]

Description: If the destination collection already exists, it will be overwritten. destination can be the key itself.

Available versions: >= 1.0.0

Time complexity: O(N), N is all members of the given set The sum of the quantities.

Returns: The number of elements in the result set.

redis SDIFFSTORE commandexample

redis> SMEMBERS joe's_movies
1) "hi, lady"
2) "Fast Five"
3) "2012"
redis> SMEMBERS peter's_movies
1) "bet man"
2) "start war"
3) "2012"
redis> SDIFFSTORE joe_diff_peter joe's_movies peter's_movies
(integer) 2
redis> SMEMBERS joe_diff_peter
1) "hi, lady"
2) "Fast Five"

Home

Videos

Q&A