Query result order

query

#1

Hi,

I would like to ask if there is an order guaranteed for the query result? Is the result sorted for instance by the key?

thx


#2

I have try, the answer is no

aql> select QKEY from test.StockSnapshot where QKEY between 6002471490149800 and 6002471600000000
+------------------+
| QKEY             |
+------------------+
| 6002471490162400 |
| 6002471490248800 |
| 6002471490335200 |
| 6002471490594400 |
| 6002471490680800 |
| 6002471490767200 |
| 6002471490853600 |
| 6002471490940000 |
| 6002471491372000 |
| 6002471490149800 |
| 6002471490236200 |
| 6002471490322600 |
| 6002471490581800 |
| 6002471490668200 |
| 6002471490754600 |
| 6002471490841000 |
| 6002471490927400 |
| 6002471491359400 |
| 6002471490158800 |
| 6002471490245200 |
| 6002471490331600 |
| 6002471490590800 |
| 6002471490677200 |
| 6002471490763600 |
| 6002471490850000 |
| 6002471490936400 |
| 6002471491368400 |
| 6002471490232600 |
| 6002471490319000 |
| 6002471490578200 |
| 6002471490664600 |
| 6002471490751000 |
| 6002471490837400 |
| 6002471490923800 |
| 6002471491355800 |
+------------------+
35 rows in set (0.006 secs)

#3

Only batch read will return in order of keys supplied. Both Secondary Indexes queries and Scans will return out of order.