时间:2021-07-01 10:21:17 帮助过:1805人阅读
redis能存多少个key?
官方说单例能处理key:2.5亿个,参考链接:https://redis.io/topics/faq,以下是原话:
What is the maximum number of keys a single Redis instance can hold? and what the max number of elements in a Hash, List, Set, Sorted Set?
Redis can handle up to 2^32 keys, and was tested in practice to handle at least 250 million keys per instance.
Every hash, list, set, and sorted set, can hold 2^32 elements.
In other words your limit is likely the available memory in your system.
不同的数据类型存储量会有差异:
原文地址:https://redis.io/topics/data-types
Strings类型:一个String类型的value最大可以存储512M
Lists类型:list的元素个数最多为2^32-1个,也就是4294967295个。
Sets类型:元素个数最多为2^32-1个,也就是4294967295个。
Hashes类型:键值对个数最多为2^32-1个,也就是4294967295个。
Sorted sets类型:跟Sets类型相似。
以上就是redis能存多少个key的详细内容,更多请关注Gxl网其它相关文章!