[#525] Query results in ascending order

* Invert the query order
* Add datastore new index
* Retrieve the appropriate timestamp from the batch