We are having fun with Redis on a Nodejs server – great combo btw. The question is out of curiosity and should be treated as “in theory”.
Is there any performance difference between storing your values on numeric keys (1,2,3,4…) over compressed keys (A9z3,A9z4,A9z5…). I’m thinking select speed only in a database with 2 million keys.
I hope the question is not too damn stupid, best regards 😉
If you are storing the keys as a list or a string, there should be no performance difference, as the integers are stored the same way as strings in memory. So, there would be no noticeable performance difference when selecting a string or an integer.
Memory wise, the compressed keys would have less overhead in memory “because with small keys and values there is a lot of overhead.” But we are talking bytes here. (http://redis.io/topics/faq)