TWCS is the best compaction strategy for TTL data, even if you have
different TTLs (set the time window based on your largest TTL, so it would
be 1 day in your case).
Enable unchecked tombstone compaction to clear the data with 2 days TTL
along the way. This is done by setting :
ALTER TABLE my_table WITH compaction =
If you're running 3.11.1 at least, you can turn on the
unsafe_aggressive_sstable_expiration introduced by CASSANDRA-13418
Post by raman gugnani
I have one table in which i have some data which has TTL of 2days and some
data which has TTL of 60 days. What compaction strategy will suits the most.
1. LeveledCompactionStrategy (LCS)
2. SizeTieredCompactionStrategy (STCS)
3. TimeWindowCompactionStrategy (TWCS)
Apache Cassandra Consulting