Nonfoldable User Defined Functions

Most SQL Server professionals know that wrapping a column in a function can kill SARGability. Far fewer realize that putting a user-defined function on the other side of the predicate can be just as dangerous. The reason isn’t the function itself. It’s...
Table Hint UPDLOCK and LOCK ESCALATION

Table Hint UPDLOCK and LOCK ESCALATION

When using table hints, a few rules should be recommende, which – if ignored – can quickly lead to performance problems. In the database of one of our customer’s software, UPDLOCK is used as a table hint to force a serialization of processes....