CREATE TABLE IF NOT EXISTS video (key int, value int, PRIMARY KEY (key, value));
Here Partition Key is key
and Clustering Key is value
. No regular columns.
Assume, there are 1000000 rows in this partition.
What is the size of the partition?
To calculate the partition size, you need the following data points:
In your case:
int
column) is 4 bytes
0 bytes
int
+ 0
regular columns) is 4 + 0 bytes
8 bytes
on averageSo for 1M rows:
partition size = 4B + 0B + (4B x 1,000,000 cells) + (8B x 1,000,000,000 rows)
= 12,000,004 bytes
= 11.44 MB
Cheers!