Reputation: 2196
I've been reading the documentation on this and I'm struggling to get a full understanding of it.
The documentation states: "Recommended for time series and expiring time-to-live (TTL) workloads". I'm not sure what "recommended for time series" means. Does that mean the partition key is a time/date data type (e.g. timestamp), does it mean that clustering columns are of that type as well?
Take for example the below partition key, The insert_timestamp is a clustering column but in BIGINT format (but it's actually a date/time in epoch format). I don't believe updates occur.
PRIMARY KEY ((sku, loc_id), insert_timestamp, supply_id)
A TTL is provided during the inserts. Does this qualify for a good candidate for time based compaction (because they only keep data around, say, 1 month)? When they say "recommended for time series", what exactly does that mean?
Thanks in advance.
-Jim
Upvotes: 0
Views: 478
Reputation: 3937
Yes it does. Essentially if you have a scenario where you do only inserts and do not update the data. And then the data expires after a certain period of time.
You are in an append only scenario which qualifies for TWCS.
This is a talk given by the developer who created TWCS, Check this out to understand the internals of TWCS https://www.youtube.com/watch?v=PWtekUWCIaw
Upvotes: 1