您好,欢迎来到智榕旅游。
搜索
您的当前位置:首页redis能存多少个key

redis能存多少个key

来源:智榕旅游
Redis 是一个高性能的key-value数据库。 redis的出现,很大程度补偿了memcached这类key/value存储的不足,在部 分场合可以对关系数据库起到很好的补充作用。它提供了Java,C/C++,C#,PHP,JavaScript,Perl,Object-C,Python,Ruby,Erlang等客户端,使用很方便。

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类型相似。

Copyright © 2019- zrrp.cn 版权所有 赣ICP备2024042808号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务