For a query to use an index to avoid a sort step, the keys specified in the order by clause must be a prefix subset of the index keys. For example, if the index specifies the keys as A, B, C, D:
The following order by clauses can use the index:
A
A, B
A, B, C
A, B, C, D
And other set of columns cannot use the index. For example, these are not prefix subsets:
A, C
B, C, D