Delegation Rules: ORDER BY
- ORDER BY can be delegated to a data source provider if the data provider supports it.
- ORDER BY can be delegated only if the entire query can be delegated.
- ORDER BY can be delegated only when it contains a column name or an index that points to a column name. Only one column or alias will be delegated. If there is more than one column in the ORDER BY, the left-most column will be delegated.
- ORDER BY cannot be delegated if it contains a function or operator.
- If the data source provider supports ORDER BY but does not support GROUP BY, the delegated query will return an ORDER BY with the column to be grouped by.
- ORDER BY can be delegated regardless of which parts of the WHERE clause are delegated to the data source provider. This applies to non-aggregating queries only.