Search code examples
cassandracqlcql3

TTL field for a set of columns in CQL3 - Cassandra


Consider the following Insert statement.

    INSERT INTO NerdMovies (movie, director, main_actor, year)
                    VALUES ('Serenity', 'Joss Whedon', 'Nathan Fillion', 2005)
    USING TTL 86400;

Does the TTL field specify the time to live for the whole set of columns for a particular primary key or just one particular column. Because i would want to specify a TTL for a whole set of columns that should get deleted after the TTL expires.


Solution

  • Ok, I figured it out my self. It sets the TTL for the whole set of columns. so, all the columns for a particular primary key will be deleted once the TTL expires.