简体   繁体   中英

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? If I will chose text type will performance will be the same if I will put keys which is not more then 64 bits?
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?

For variable bits length you could use a blob field type. 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...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM