SQL Server threads architecture

SQL Server retrieves threads from Windows. The SQL Server configuration setting max worker threads (set at instance level) determines how many threads will be retrieved. SQL Server has its own internal scheduling system, independent of the scheduling performed by the operating system. Instead of using Windows threads directly, SQL Server creates a pool of worker … Continue reading SQL Server threads architecture

How Update works?

Update data in SQL Server is a simple task. Using the command update table set column = value where column = value. Don't forget the where clause :). But, what SQL Server does internally? Delete plus Insert? Modify? Well, the answer depends. Let's see examples how that works. First, create a database and table for … Continue reading How Update works?

Don’t shrink the trees

The most common and widely used index that we know are nonclustered index. These indexes are created using the famous b-tree (balanced tree). B-tree is a data-structured tree where we have the root and leaves. A nonclustered index contains the index key values and row locators that point to the storage location of the table … Continue reading Don’t shrink the trees