Re:Storing hundreds of millions of simple key-value pairs in...
by pjscott on Tuesday November 01, 2011 @05:58PM
(#3184339)
Big-O notation refers to asymptotic behavior. The zipmap encoding of hashes only matters for small values bounded by a constant, so hash lookups are still expected O(1) time in Redis.
</extreme-pedantry>
Re:Storing hundreds of millions of simple key-value pairs in...
by catwell on Wednesday November 02, 2011 @05:05AM
(#3185901)
Your point would be valid if the memory gain observed was not directly dependent on the fact that hashes are zipmap-encoded. So the trade-off here is between the constant factor of time complexity and the constant factor of memory complexity.
Still, this is a very good way to store a lot of key/value pairs in Redis.