[英]What type of primary key we need to use for specific length of bits in Cassandra?
I want to know in which situations which type of primary key I need to use. 我想知道在哪种情况下需要使用哪种类型的主键。
Situations: 情况:
1. If I need 64 bit key than is bigint is the best for it? 1.如果我需要64位密钥,那么bigint最好吗? If I will chose text type will performance will be the same if I will put keys which is not more then 64 bits? 如果我选择文本类型,如果我输入不超过64位的密钥,性能是否会相同?
2. If I need a primary key which is more then 64 bits and less then 128 bits (let say 80 bits) then which data type I have to use for primary key? 2.如果我需要一个大于64位且小于128位(比如说80位)的主键,那么我必须为主键使用哪种数据类型?
For variable bits length you could use a blob
field type. 对于可变位长度,可以使用blob
字段类型。 Or maybe throw away the small optimization you are looking for and stick with two bigint
type primary key and move ahead with your project... 或者也许放弃您正在寻找的小型优化并坚持使用两个bigint
类型的主键并继续进行您的项目...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.