redis中的sortedset中的score值的大小,是否会影响占用空间的小大
相同的数据,score使用很长的一个double值(10位以上数字)和一个int16(5位数字),占用的空间大小是否一样,
使用int16的score是否会更节省空间呢?
曾经蜡笔没有小新2017-04-25 09:04:45
Refer to Chapter 8, Section 8.6, p78 of "Redis Design and Implementation": "The member of each element in the ordered set is a string object, and the score of each element is a double-type floating point number. ". In other words, for zset, redis uses a fixed double type to represent numbers, instead of using "up conversion" to store numbers like an integer set.