Can I get a count of records that are within a certain TTL range?

I would like to query all records, in all sets that have a TTL of less than 86400. I’ve tried :

aql> set RECORD_PRINT_METADATA true
aql> select * from fooNamespace.fooSet where ttl BETWEEN 0 and 86400;

But it tells me no records. I think I might be barking up the wrong tree.

You can certainly do that, but probably not with AQL. You would want to use an ‘Aerospike Expression’ Aerospike Expressions | Aerospike Documentation in some kind of language that supports it Client Matrix | Developer Hub AQL is more of a small troubleshooting tool unfortunately and there are many features it lacks many users expect

Welcome to the forum @Jeff.MacDonald! @Albot is on the right track for sure. A scan using a filter expression is probably your best bet.

We also have a great tutorial on Expressions in Aerospike.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.