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.
推荐手册:Redis命令操作中文手册
不同的数据类型存储量会有差异:
原文地址: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类型相似。
相关文章推荐:
1.redis一个实例能存多少个key
2.redis判断key是否存在
相关视频推荐:
1.燕十八redis视频教程
以上就是redis能存多少个key的详细内容,转载自php中文网
发表评论 取消回复