Руководство разработчика:
Цитата:
Using Index and Order By in select statements
If data ordering is important, use ORDER BY in your SELECT statements. If you can predict that the database will not be capable of deciding which index it should choose, use the INDEX keyword to give the database a hint of which index to choose. Combine this with an ORDER BY expression to get MorphX to select records in a specific order.
Using the INDEX keyword but without ORDER BY the selected records are sorted according to the definition of the INDEX. If an index has been deactivated (Enabled=No), the SELECT statement is still valid. However, the database cannot use the hint (as the index does not exist), and has to choose some other index.
In general, use indexes to optimize selection of records. As a well-defined side effect, data are sorted according to the index definition. Use the REVERSE keyword if you want the sorted output in reverse order.