redis中的sortedset中的score值的大小,是否会影响占用空间的小大
phpcn_u1582
phpcn_u1582 2017-04-25 09:02:45
0
1
987

redis中的sortedset中的score值的大小,是否会影响占用空间的小大

相同的数据,score使用很长的一个double值(10位以上数字)和一个int16(5位数字),占用的空间大小是否一样,
使用int16的score是否会更节省空间呢?

phpcn_u1582
phpcn_u1582

reply all(1)
曾经蜡笔没有小新

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template