Difference between Lock and Latch

Locks everywhere is a good start to understand how SQL Server provides logical consistency. Every operation has a lock and latch. What does Latch mean? Latch protects memory on Buffer Pool, is a method that provides physical consistency. SQL Server does operations in memory, that means, it read the page from disk and put that … Continue reading Difference between Lock and Latch

Sending files to AWS S3 using Powershell

Amazon has a Powershell module to manage the the principal services available. I've been working with EC2, RDS and S3 and I wrote a tip to fast copy data to S3 and I¬†created the function bellow to help to send files to S3. I'm using the function bellow to send my backups to S3. It's … Continue reading Sending files to AWS S3 using Powershell

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 SQL Server stores data?

SQL Server stores data in heaps or b-tree structures. Heaps are unordered set and balanced trees are ordered by their keys. Heaps and b-tree use collection of pages within the structure and it's called allocation units. IN_ROW_DATA -> contains all data. LOB_DATA -> structure for large objects used to stored in xml, varchar(max), nvarchar(max), varbinary(max) … Continue reading How SQL Server stores data?

Wait Statistics

The first post about waits on SQL Server was regarding what SQL Server Wait means, a brief explanation and the concept might be difficult to catch at first. When the task needs to wait for a resource, it is placed on a list until the resource is available. SQL Server keeps detailed internal records of … Continue reading Wait Statistics