3 ms·
> If you are doing an order by on a single table on an indexed column, is that expensive? No, but it sure is unusual. I don't know a lot of folks who only refe
by BrentOzar 10y ago
> If you are doing an order by on a single table on an indexed column, is that expensive?
No, but it sure is unusual. I don't know a lot of folks who only reference a single table in their queries. (Folks who do are generally using key/value stores, not RDBMS's.)
> If you are doing an order by on a clustered index, wouldn't the order by be essentially free?
Assuming you're using an identity (sequential) field, that's also incredibly unusual. The clustering key rarely has value to the select query.