Hi eveyone,

In our use-case, we need to insert 200 millions rows per day.

By default we need to retain data for 10 days unless a certain condition is
matched from client within same day(in that case we need to update ONE
column and set ttl to 1 day). In 98% of cases we will find that match and
2% data is going to stay for 10 days.

We decided to use TWCS with 1 day bucket and default TTL 10 days. GC grade
is 3 days.

We have 2 options:
1. When the match is found, update one non-primary column with updated
record and rest non-primary columns with same data USING TTL 1 day(to set
ttl for all the columns). So data will be purged after 4 days.
OR
2. As soon as we find a match, delete that row and insert a new rows with 1
day ttl. (one extra delete and lots of tombstones). 'deleted' row will be
purged after 3rd day and ttled data will be purged on after 4th day I
believe.

Which approach is better for TWCS and TTL here?

Thanks.

Reply via email to