Update TTL for the entire row when executing the CQL update statement

Suppose you have a row with 4 columns, that when you create it, you set the TTL to 1 hour.

I need to periodically update the row date column and at the same time update the TTL of the entire row.

Asusming this does not work, what is the correct way to achieve this?

update mytable using ttl 3600
set accessed_on=? 
+4
source share
1 answer

Cassandra only supports TTL for each column, which is a great flexible function, but the possibility of a TTL row is a function that has been requested many times.

Your only option is to update all the columns in the row, thereby updating the TTL in all the columns.

+4
source

Source: https://habr.com/ru/post/1541758/


All Articles