Trying to directly calculate MAXINT for the BIGINT data type in SQL Server will either cause an arithmetic overflow error or produce inaccurate values. This article explains how to calculate this value accurately. [more…]
In the March issue of SQL Server Pro Itzik Ben-Gan wrote about an undocumented DBCC command that was recently discovered in the wild by Eladio Rincon (http://www.sqlmag.com/article/sql-server/options-affecting-parallelism-141505). Itzik closed the article by expressing his hope to get this statement documented [more…]
When thinking about the indexes for update statements it is easy to overlook an important peculiarity in the way SQL Server finds the rows to update before updating them. Those pesky Lookups If you have an UPDATE statement that filters [more…]
With this blog post I am going to dive a little deeper into how SQL Server generates and handles identity values and what the implications for your code are. Your New Identity SQL Server manages identity values on a per [more…]
Today I am going to talk about the evil side of the Assert Operator. To start out, let me introduce this operator to you: The Assert Operator The Assert Operator is used by SQL Server in execution plans that require [more…]