A
A
Alexey Konovalov2019-02-21 19:30:06
Redis
Alexey Konovalov, 2019-02-21 19:30:06

Do I understand the principle of using Redis correctly?

Hello!
I understood the purpose of Redis as something like this:
If I have a large database, let's say 10 million users and each can have about 100 friends, then the friends table in mysql will contain 1 billion records.
For example, I need to select a feed of 500 users, and also display the value of whether the user is my friend. It turns out that JOINing records from a database with a billion records is hard for MySql. Therefore, we create in radish a copy of the friends table from the mysql database. And every time we remove or add a friend. We have to update the entry in both mysql and redis.
Well, then we work only with redis.
Please correct me if wrong

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2019-02-21
@dimonchik2013

I misunderstood, but about friends, not this database at all,
see graph ones
, but radish, yes, it’s more efficient than just a muscle cache in terms of access speed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question