Saturday 30 December 2017

Auto Growth Setting to Improve Performance

What is the auto growth feature?

     An auto-growth event is a part of SQL Server that expands the size of a database file when it runs out of space.  If there is a transaction (such as many inserts) that requires more log space than is available, the transaction log file of that database will need to adjust to the new space needed by increasing the log file size. 

What happens when auto growth is expanding?

This can cause a performance issue, as this is a blocking operation.  The transaction that that initiated the log growth will be held until more space is allocated to the log file, determined by the auto growth setting
Physical fragmented on the disk occurs as the pages required are not necessarily next to each other.  The more auto-growth events you have the more physical fragmentation you will have the files

Avoid auto growth by pro actively configuring the auto growth

Pre-size the data and log files
Manually manage the growth of data and log files
Auto growth should be used for safety reasons only

Don’t rely completely on auto growth

Maintain a level of at least 25 percent available space across disks to allow for growth and peak usage patterns 
Set the auto-grow settings to grow based on megabytes instead of a percentage, so as to have the auto growth consistent

No comments:

Post a Comment

PowerShell script to backup/restore procedures for Migrating each database

  Below is the PowerShell script that will implement backup/restore procedures for each database which we want to migrate to complete the mi...