AQL is a tool mostly used for managing indexes, UDFs, running ad-hoc UDFs (maintenance, rollups, etc) and to a lesser extent for browsing your data. If you want to use the full set of List or Map operations, you should use a language client such as Java, Python, Go, etc.
The List API includes the size() of the list. For example, in the Python client you have aerospike.Client.list_size
. Because the list is stored in a msgpack serialized format at the server-side, it's going to be hard for you to tell if the msgpacked list is larger than your max-write-block
, assuming your data is on SSD (if it's in-memory without persistence you don't have the same record size limit).
You can estimate the size, but to follow the EAFP principle, it would be simpler to write the record without worrying about the size in advance, and catch the exception for error code 13 'record too big' (for example, aerospike.exception.RecordTooBig
). You can then decide on how to overflow into separate records (key
, key-2
.. key-N
).