- If using Redis , we can use one record (sets and ordered sets) to store Parent-Childs relationship,
- but if using Mysql, we should use several rows to store Parent-Childs relationship. (Or is there a better way?)
If using Redis , we can use one record (sets and ordered sets) to
Share
Redis is much faster on big datasets, because the lookup time is constant no matter how much parents do you have and how big is the children set for each of them. But if you have to do any lookups more complex than “have ID of parent, need to get IDs of children”, then you will have more problems than advantages with Redis.