Tag: internals

Does the Order By clause recalculate the value in SQL Server?

When I use a calculation or a subquery in my ORDER clause which is already in my SELECT clause, does SQL know to just order by that column? Or does it recalculate everything for each row when sorting? For instance, lets say I’m writing a terrible query like this: SELECT EmployeeName, (SELECT COUNT(*) FROM Employee […]

SQL Server 2008 File Write Behaviors

Sort of a 101 question: with multiple files in a user defined filegroup, what is SQL Servers behavior when inserting rows? Round robin? Write until full and move on to the next? I have found some interesting posts regarding tempDb on this subject that suggest round robin, but nothing conclusive.

How does SQL Server store decimal type values internally?

In SQL Server you can use FLOAT or REAL to store floating point values the storage format of which is cleared defined by the IEEE 754 standard. For fixed point values we can use DECIMAL type (which has a synonym NUMERIC). However I’m not pretty sure how SQL Server store DECIMAL values internally. For example, […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.