Using GridDB, I sometimes need to read data starting with the first row, and sometimes starting with the last row. Currently I have two containers with the same data but inserted in the opposite order of each other. While functional, this does seem rather inefficient. So the question is: are there better ways to do it? Can the rowkey, or an index assigned to a container be inverted with a function call? Or is there a way to adjust the search accordingly?
You're looking for the TQL ASC or DESC operator which will invert the order data is returned.
If you actually want an inverted index a timestamp I would add a field to your schema and when inserting data, insert (LLONG_MAX - timestamp)