The maximum key size in Kassandra

I am completely new to using cassandra .. is there a maximum key size and will this affect performance?

Thanks!

+4
source share
2 answers

http://en.wikipedia.org/wiki/Apache_Cassandra claims (apparently wrong!) that:

A row in a table is a row with no size limit, although typically between 16 and 36 bytes in length

See also:

http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/value-size-is-there-a-suggested-limit-td4959690.html , which assumes that there is some limit.

Obviously, very large keys can affect network performance if they need to be sent via the Trrift RPC interface - and they will cost storage. I suggest you try a quick test to see how it affects your data.

One way to deal with this may be to pre-hash your keys and simply use the hash value as the key, although this is not suitable for all use cases.

+1
source

The key (and column names) must be less than 64 Kbytes.

Routing is O (N) key size, and requesting and updating is O (N log N). In practice, these factors are usually overshadowed by other overheads, but some users with very large β€œnatural” keys use their hashes instead to reduce size.

+14
source

All Articles