Finding the last successful CHECKDB

One very important part of your SQL Server maintenance procedure should be running consistency checks on a regular basis using CHECKDB. Not only does CHECKDB check the health of important internal pages of your database like PFS, GAM, IAM and many more, it also check for errors in your data pages (and it does a […]

How SQL Server statistics are generated and updated

One of the easiest ways to increase query performance on your database is making sure your statistics are up-to-date. Statistics are – if you enabled the options in your database properties – automatically created and updated by the SQL Server Engine. This does not however mean that the statistics are correct or up-to-date! In this […]

A Tour of the Transaction Log: Part 3 Reading Log Backups

In part one and two of our Tour of the Transaction Log articles we focused on reading events from the active transaction log, there can be times when that will not be enough and we actually have to dig deeper into transaction log backups to find the information we need. In this article I will show you the use […]

A tour of the transaction log: Part 1 INSERT operations

The transaction log is a very important part of SQL Server. Every data modification operation is logged in the transaction log before being ‘hardened’ to the database file. There are plenty of scenarios where you might take a look at the transaction log like point-in-time transaction log backup restores (to stop at a certain LSN) […]

How implicit data type conversion slows down your query

Implicit data type conversion is one of those things you hardly think about or notice when writing your queries. But as you will soon find out while reading this article it is one of those small tweaks that can increase the performance of your query! Implicit data type conversion happens when the SQL Server detects […]

Optimize for ad-hoc workloads

SQL Server 2008 introduced a new advanced option called “Optimize for ad-hoc workloads”. According to Microsoft: The optimize for ad hoc workloads option is used to improve the efficiency of the plan cache for workloads that contain many single use ad hoc batches. When this option is set to 1, the Database Engine stores a small compiled […]