SQL Server and Disk IO

An I/O latch wait occurs when a page is accessed for reading or writing but the page is not available in the buffer pool. It causes waits on PAGEIOLATCH_EX or PAGEIOLATCH_SH, depending upon the type of request. These wait types can indicate an I/O bottleneck. You can query the sys.dm_os_wait_stats DMV to find latch wait statistics.... » read more

Speeding up Database Restore

Use the following instead of default restore settings will speed up database restore. Use the following to determine buffercount to set to… MaxTransferSize: 4032 KBBufferCount: 96Sets Of Buffers: 2Total buffer space: 756 MBMemory limit: 1023 MB Max Transfer Size * Buffer Count * Sets of Buffers = Total Buffer Space 4032 * 96 * 2... » read more

Lock Pages in Memory

https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/enable-the-lock-pages-in-memory-option-windows?view=sql-server-2017

Track Rollback Status After Kill

What Happens in a Transaction When a transaction is being committed, each step is written into the transaction log. Each value that is being inserted, updated, or deleted is recorded so that if there is a failure before the log is written to the data file, the appropriate rollback or roll forward can take place.... » read more

Best Practices to Increase Restore Speed

Everyone has a list of best practices for backups, including me. But, you know what doesn’t get talked about much? Restores. Yeah, there are things you can do to make your restores better, faster, stronger. Why would you want to improve restore speed? Think about it like this, backups are something that you automate, tweak,... » read more

Ways to improve native SQL database backup and restore

Ways to improve native SQL database backup and restore times: Backup your databases with compression: I/O is typically the bottleneck, this shifts some of the work to CPU. Change your storage configuration: Store backups locally or on higher-performance SAN Backup your databases to multiple files (stripes): This might depends on your specific storage and network... » read more

Instant File Initialization and Database Recovery

When SQL Server reserves new space on a disk, it initializes the space with zeros. This behavior can be switched off thereby reducingthe execution time of some operations and the load on the disk subsystem. Disk space reservation without initialization is called Instant File Initialization. This feature is not widely known, although its use has become possible starting with SQL Server 2005. The benefits of the Instant File Initialization are the following: 1. Accelerating the creation... » read more

Setting Max Memory for SQL Server

By default, SQL Server’s max memory is 2147483647 – a heck of a lot more than you actually have.  Trivia time – that’s the max number for a signed 32-bit integer.  SQL Server will just keep using more and more memory until there’s none left on the system. If the operating system has no memory... » read more