Binary order is the fastest sort order option.
The following table shows the approximate decrease in sort order performance, relative to Binary order, for each sort order. The operation evaluated involved string comparisons on character fields.
Sort order | Percent slower |
---|---|
Dictionary order, case-sensitive | 20% |
Dictionary order, case-insensitive | 20% |
Dictionary order, case-insensitive, uppercase preference | 20% |
Dictionary order, case-insensitive, accent-insensitive | 35% |
The percentages in the table are approximate. The overall performance difference between sort orders varies significantly depending on the types of operations and the type of data used. Sorting operations that depend on string comparisons on character fields (for example GROUP BY and LIKE statements) take more time to process than other sorting operations and have the greatest effect on sorting speed.
With certain queries, if there is a nonunique clustered index on a character value, sort order options that define uppercase preference require the optimizer to perform a sort. Using a sort order with no uppercase preference, such as Dictionary order, case-insensitive (no uppercase preference), greatly improves performance because no sorting is necessary. Choosing Dictionary order, case-insensitive (no uppercase preference), causes an uppercase A and a lowercase a to be treated the same in an ORDER BY statement.