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 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) […]

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 […]