Redis—Set type and common commands

Redis collection (Set)

Redis's Set is an unordered collection of String types. Set members are unique, which means that no duplicate data can appear in the set.

The encoding of collection objects can be intset or hashtable.

Collections in Redis are implemented through hash tables, so the complexity of adding, deleting, and searching is O(1).

The maximum number of members in a collection is 232 - 1 (4294967295, each collection can store more than 4 billion members).

Common commands

Click to view

Digging into data structures:

follow-up summary

Guess you like

Origin blog.csdn.net/weixin_43743711/article/details/126437355