Cassandra uuid as a key string

Why in keys Cassandra is usually defined as UUID. It looks like the key is being created on the client side, so why not just store it as a string? What is the use of storage as a UUID?

+3
source share
3 answers

Cassandra can have any key, key - bytearray. If clients want to have a key like "foobar" or any other string of arbitrary length, there is nothing wrong with that. The Cassandra client converts it to an array of bytes before passing it to the Cassandra server. Technically, it will be stored as "foobar" on the server side.

There are other things to consider when choosing a key format:

+4

Cassandra ( therof), UUID.

UUID :

UUID - 128 . , UUID 32 . 16- , , 512- 4 .

+3

This saves disk space when there are a large number of lines.

Down, increase performance by reducing the amount of data to eject when there are large numbers of rows.

+1
source

All Articles