You could have two tables with the data inserted with TTL=5 minutes in one and TTL=15 minutes in the other. Just select everything from the appropriate table.
Having separate tables for different TTLs is also a good practice for keeping your SSTables in good condition. From: DuyHai Doan <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Wednesday 24 September 2014 00:58 To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: How to get data which has changed within x minutes using CQL? No, you need to compute yourself now - 15mins. CQL3 does not offer built-in functions to deal with dates right now Le 24 sept. 2014 00:47, "Check Peck" <[email protected]<mailto:[email protected]>> a écrit : On Tue, Sep 23, 2014 at 3:41 PM, DuyHai Doan <[email protected]<mailto:[email protected]>> wrote: now - 15 mins Can I run like this in CQL using cqlsh? SELECT * FROM client_data WHERE client_id = 1 and last_modified_date >= now - 15 mins When I ran the above query I got an error on my cql client - Bad Request: line 1:81 no viable alternative at input '-'
