1
votes

I'm storing many small numbers in a Cassandra table with 7.5 billion rows. Many of the numbers can be represented as a tinyint (1 byte), but Cassandra doesn't seem to support any numeric data types which are smaller than 4 bytes. https://docs.datastax.com/en/cql/3.0/cql/cql_reference/cql_data_types_c.html

My table is about 4 TB and I'm looking to cut down the size. Is varint my answer ("Arbitrary-precision integer")? How is varint represented in memory and what is its smallest size?

Or alternatively, is there a preferred compression configuration that can help this specific case?

1

1 Answers

3
votes

You are looking on old version of documentation. Since Cassandra 2.2 smallint and tinyint are supported. See enter link description here

If you are worried about your disk usage, I would recommend to use Cassandra 3.x.