Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

ashok.dcosta_187920 avatar image
ashok.dcosta_187920 asked ·

cassandra compaction

Compaction in cassandra is merging data from multiple SS tables , does it perform splitting data from one ss table into multiple ones ?

cassandra
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

vikram.singh.chouhan_187371 avatar image
vikram.singh.chouhan_187371 answered ·

Hi @ashok.dcosta_187920: Compaction is the process of freeing up space by merging large accumulated data‐ files. So it is meant to merge smaller SST tables into a bigger one and not the other way around.

A compaction operation in Cassandra is performed in order to merge SSTables. SSTables are immutable, which helps Cassandra achieve such high write speeds. However, periodic compaction of these SSTables is important in order to support fast read performance and clean out stale data values. During compaction, the data in SSTables are merged: the keys are merged, columns are combined, obsolete values are discarded, and a new index is created.

For more details see How compaction works in Cassandra. Thanks!!


1 comment Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thanks for being part of the community but I wanted to point out that these statements aren't always true and can be misleading to new users:

So it is meant to merge smaller SST tables into a bigger one and not the other way around.
SSTables are immutable, which helps Cassandra achieve such high write speeds.
0 Likes 0 · ·