Skip to content

Instantly share code, notes, and snippets.

@dmertl
Last active February 3, 2024 16:44
Show Gist options
  • Save dmertl/be6289bbadc692cd1330318124a4a15a to your computer and use it in GitHub Desktop.
Save dmertl/be6289bbadc692cd1330318124a4a15a to your computer and use it in GitHub Desktop.
Cassandra data type byte sizes
uuid: 16 bytes
timeuuid: 16 bytes
timestamp: 8 bytes
bigint: 8 bytes
counter: 8 bytes
double: 8 bytes
time: 8 bytes
inet: 4 bytes (IPv4) or 16 bytes (IPV6)
date: 4 bytes
float: 4 bytes
int 4 bytes
smallint: 2 bytes
tinyint: 1 byte
boolean: 1 byte
ascii: equires an estimate of average # chars * 1 byte/char
text/varchar: requires an estimate of average # chars * (avg. # bytes/char for language)
map/list/set/blob: an estimate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment