Does redis store this key as an int rather than the string
representation of this int?
Thanks,
Jonathan
--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
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.
Sets of just integers will be serializen in "compact" way, and ordered internnally for do more faster lookup opertion
Actually not, nor 2.0 nor 2.2, for two different reasons:
2.0 -> used redis objects as keys, but did not encoded keys as
integers because we need to perform hasing on keys many many times, so
the CPU cost was too high.
2.2 -> no longer uses redis objects as keys, but plain strings, in
order to save memory. So encoding is completely impossible (and not
desirable).
Another point for not trying key encoding is that data sets where key
names are not prefixed with some kind of non-numeric character are
very rare. Usually you have user:1000 and not 1000.
Cheers,
Salvatore
>
> Thanks,
>
> Jonathan
>
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> 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.
>
>
--
Salvatore 'antirez' Sanfilippo
open source developer - VMware
http://invece.org
"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele