redis - Redis命令HMSET有字段数限制吗?

标签 redis

Redis 命令 HMSET 字段的最大数量限制是多少?如果我通过 HMSET 将 100000 个字段设置为一个键,比较使用每个字段作为键是否会导致性能问题?

最佳答案

相当大,64位系统为2^64-1,32位系统为2^32 -1, https://groups.google.com/d/msg/redis-db/eArHCH9kHKA/UFFRkp0iQ4UJ

1) Number of keys in every Redis database: 2^64-1 in 64 bit systems. 2^32-1 in 32 bit systems. 2) Number of hash fields in every hash: 2^64-1 in 64 bit systems. 2^32-1 in 32 bit systems.

Given that a 32 bit instance has at max 4GB of addressable space, the limit is unreachable. For 64 bit instances, given how big is 2^64-1, the limit is unreachable.

So for every practical point of view consider keys and hashes only limited by the amount of RAM you have.

Salvatore

关于redis - Redis命令HMSET有字段数限制吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39265061/

相关文章:

ruby-on-rails - 客户端服务架构 : keep client in sync with in-memory data sctructure

python - 从 redis pub/sub 中丢失的连接中恢复

redis - ELK Stack 和 Redis。我可以阻止数据库被清空吗?

redis - redisql 可以在 Windows 上运行吗?

javascript - Node.JS 对象原型(prototype)在 Redis 中只能是一个 Object 或 null

c# - 从 Redis 获取复杂对象时,值为空

javascript - 如何在我的简单 Express 应用中使用 Node.js 集群?

c - 什么类型的连接更好地用于 redis?

Laravel Echo 私有(private) channel 未收听

python - 无法使用 django-redis 连接到 redis