Was this page helpful?
Caution
You're viewing documentation for a previous version of ScyllaDB Open Source. Switch to the latest stable version.
This procedure describes how to change the compaction strategy. A reason to change the compaction strategy can be performance tradeoffs (disk space usage, read and write amplification). Change the compaction strategy means that the SSTables will be recompacted until the new compaction strategy is satisfied. Changing the compaction strategy doesn’t require a node to restart.
Verify what the current compaction strategy is. Run the following:
DESCRIBE TABLE nba.team_roster;
DESCRIBE TABLE nba.team_roster ;
CREATE TABLE nba.team_roster (
player_name text PRIMARY KEY,
player_jersy_number int,
player_position text,
team text
) AND compaction = {'class': 'SizeTieredCompactionStrategy'};
Change the compaction strategy to a new one. If you are unsure of which strategy to use, refer to Choose a Compaction Strategy for more information.
ALTER TABLE nba.team_roster WITH compaction = {'class' : 'LeveledCompactionStrategy'}
Was this page helpful?