Redis data types
Key-Value data types supported by Redis
- String type
- The string type is the most basic data type of Redis, and a key can store up to 512MB.
- The string type is binary safe.
- Hash type hash is a string type of field and value mapping table, hash is particularly suitable for storing objects. Each hash can store 2^ (32-1) key-value pairs (more than 4 billion)
- List types can store 2^ (32-1) elements in order of insertion
- Set type
- Unordered collection of string types
- It is implemented by a hash table, so the complexity of adding, deleting, and finding is O (1).
- The largest number of members in the collection is 2^ (32-1)
- Zset (sored set: Ordered set) type
- Each element is associated with a double-type fraction. Redis is a small-to-large ordering of the members in a collection by fractions
- Members are unique, but fractions (score) can be duplicated
If you find an error, please tap, welcome message exchange, thank you
Redis data types