Re:Things Developers Should Know About SQL Server (2013)
by BrentOzar on Sunday February 12, 2017 @03:27PM
(#13630524)
> 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.
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.