Pars
Pars

Reputation: 5262

storing array of arrays in Redis

I have a huge database with complex relations and want to cache some index and strings in order to have much faster access to them, so that I want to store them in some sort of cache to minimize accessing DB to fetch informations.

I searched and found Memcached and Redis can be a suitable for my purpose. After more researching, I found out Memcache has limitation about storing in it's "Value" ( Key -> Value ).

In Redis, Is it possible to store a multi dimension array ( array of arrays of arrays ) in a "Value" ( Key -> value ). which can be a 20MB or 30MB of data in maximum.

if Yes, Doesn't that decrease performance?

Upvotes: 2

Views: 2550

Answers (2)

d-_-b
d-_-b

Reputation: 23171

If I'm not mistaken, Redis string values have a limit of 512MB.

http://redis.io/topics/data-types

String

A String value can be at max 512 Megabytes in length.

List

The max length of a list is 232 - 1 elements (4294967295, more than 4 billion of elements per list).

Set

The max number of members in a set is 232 - 1 (4294967295, more than 4 billion of members per set).

Hash

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

Upvotes: 3

Chhavi Gangwal
Chhavi Gangwal

Reputation: 1176

You should consider using mongoDB for your use case. It will enable indexing and querying complex nested structure and will be fast as well.

Upvotes: 1

Related Questions