Changing the Collation of the Instance, the Databases, and All Columns in All User Databases: What Could Possibly Go Wrong?

Demystifying What "sqlservr -q" Actually Does (last updated on 2018-06-19) For various reasons, people sometimes find themselves in the unfortunate (and unenviable) situation of having an Instance of SQL Server configured with the wrong Collation. This can often lead to unexpected errors and/or sorting and comparison behavior. People sometimes try to "fix" this problem by… Continue reading Changing the Collation of the Instance, the Databases, and All Columns in All User Databases: What Could Possibly Go Wrong?

Clustered Index Uniquifier Existence and Size

In SQL Server, Clustered Indexes created without the UNIQUE keyword must guarantee unique key values by adding a hidden "uniquifier". But how big is this field, and is it always there?

Impact on Indexes When Mixing VARCHAR and NVARCHAR Types

You may have heard, or read, that you should not mix VARCHAR and NVARCHAR datatypes, especially when one of them is a JOIN or WHERE predicate / condition, as doing so will invalidate indexes. While it is always best to have all datatypes be the same for a particular operation (comparison, concatenation, etc), the actual… Continue reading Impact on Indexes When Mixing VARCHAR and NVARCHAR Types