redis 一个hash可以存多少数据

,打扰一下,redis 一个hash可以存多少数据
最新回答
眼泪的名字

2024-07-04 02:55:55

A hash with a few fields (where few means up to one hundred or so) is stored in a way that takes very little space, so you can store millions of objects in a small Redis instance.

While Hashes are used mainly to represent objects, they are capable of storing many elements, so you can use Hashes for many other tasks as well.

Every hash can store up to 2^32 - 1 field-value pairs (more than 4 billion).

摘自Redis官网的Data type章节,意思是内存允许的情况下,可以存超过40亿数据。

九命猫

2024-07-04 10:38:55

使用Redis的脚本功能实现Redis中数据简单查询,有需要的朋友可以参考下。 在Redis的设计中,key是一切,对于Redis是可见的,而value对于Redis来说就是一个字节数组,Redis并不知道你的value中存储的是什么