AcidZombie24 writes:
> [has many questions about the internals of redis]
Generally I find that the best answer to these questions is to read
the source code, which is available on github
(
https://github.com/antirez/redis) and is written in tight but
straightforward, flat and unaccented C. In the course of this post
you have many broad and vague questions about how things work, and
really the only way to ever get a sensible and satisfactory answer in
that general case is to immerse yourself in the material.
> How is it possible `HSET "mediabucket:1155" "1155315" "939"` is more
> efficient then `SET "mediabucket:1155315" "939"`? There less data in SET
> (1155315 an d 1155 is used rather then 1155315). I personally would try
> using binary keys however I don't think that has to do with why HSETs are
> more efficient.
As per the Instagram article you linked, they are radically different
data structures; for small sizes, redis can be commanded to save
dictionary-style data in a space-efficient way, rather than in a hash
table. Check out zipmap.c.
F.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/redis-db/-/8dtVVna5Qt8J.
> To post to this group, send email to
redi...@googlegroups.com.
> To unsubscribe from this group, send email to
>
redis-db+u...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/redis-db?hl=en.