Requirement is simple: we have to create a table which will have only 24 hours of data. We have two options
I have general idea about both the things but internally which one will be helpful to deal with tombstones? or both will generate same amount of tombstones? Which one will be better and why any reference link will be appreciated.
If a table has default_time_to_live
on it then rows that exceed this time limit are deleted immediately without tombstones being written. This will not affect rows / columns that have an explicit TTL set on them. These will be tombstoned.
If you go down the TTL route then you should consider setting the gc_grace_seconds
property on the table to something less than the default (10 days). Particularly if you are looking at a 24 hour TTL.
References:
How data is deleted <-- Good background
CREATE TABLE properties <-- Table property reference
About Deletes and Tombstones in Cassandra <-- Everything you ever wanted to know about deletes and tombstones
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With