Leveled compaction strategy (LCS) organizes fixed-sized SSTables into levels. Within each level, a partition key appears in only one SSTable, and compaction runs when a level fills. section 8.4.1 section 8.5
LCS differs from the other ScyllaDB compaction strategies in several practical ways:
- It uses levels rather than size-based tiers, unlike size-tiered compaction strategy. section 8.4.1
- It keeps a partition in only one SSTable per level, reducing duplicate partition placement within that level. section 8.5
- It is one of three standard strategies alongside size-tiered and time-window compaction; size-tiered is the default. section 8.4.1
Selecting LCS for a table
Set the table's compaction strategy with CQL: ALTER TABLE reviews.authors WITH compaction = {'class': 'LeveledCompactionStrategy'};
