cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hontvári József Levente <>
Subject Re: sstable image/pic ?
Date Tue, 28 Feb 2012 09:54:19 GMT

> * Does the column name get stored for every col/val for every key 
> (which sort of worries me for long column names)

Yes, the column name is stored with each value for every key, but it may 
not matter if you switch on compression, which AFAIK has only advantages 
and will be the default.  I am also worried about the storage space, so 
I did a test.

There is a MySQL table which I intend to move to Cassandra. It has about 
40 columns with very long column names, the average is 15 characters. 
The column values are mostly 2-4 byte integers. On the other hand many 
colums are empty, specifically not NULL but 0. AFAIK MySQL is also able 
to optimize NON NULL columns with 0 values to a single bit. In Cassandra 
I simply did not store a column if its value is the default 0. The table 
size, only data without indexes, in MySQL was  about 2.5 GB with 7 
millions rows. In Cassandra it was about 12 GB without compression, and 
3,4 GB with compression (which also includes a single index for the row 

So with compression switched on, in this specific case the storage 
requirements are roughly the same on Cassandra and MySQL.

> * Is data in an sstable sorted by key then column or column then key

Sorted by key and then sorted by column.

View raw message