Good Day,
I basically want to implement a practical example of seeing the effect of using a compaction strategy and not using one on a table with a few days load of data.
I have a table called buckettest in my Db and I would like to use the TimeWindowCompactionStrategy with a time window of 3 days. Because I already have sample data in the table, I would like to create a new table called (buckettestTWCS ) and use this compaction strategy.
I basically ran a describe command for the existing table and modified the create table script to include this strategy. Below is the modified script:
CREATE TABLE buckettestTWCS( customer text, assetid text, ... PRIMARY KEY ((customer),assetid, timestamp_modified) ) WITH CLUSTERING ORDER BY (assetid ASC,timestamp ASC) AND compaction = {'class': 'org.apache.cassandra.db.compaction.TimeWindowCompactionStrategy', 'compaction_window_size': '3', 'compaction_window_unit': 'DAYS'} AND default_time_to_live = 0 ... ;
My question is based on the default_time_live property and whether I would need to change this default value or leave it as is. I wouldn't want to change any property which would affect the performance on querying data in the table.
Any feedback and insight would be greatly appreciated. I am still researching on different ways on implementing compaction strategies as I want to fully understand it in depth.
Kind Regards,
David.