SQL Server Health Check

[Quick Guide] Autogrowth in SQL Server: Best Practices

Updated
2 min read
Written by
Mark Varnas

What is the autogrowth setting?

It’s a procedure used by the SQL Server engine to expand the database size when all its space runs out.

If the auto-growth setting for a database is not set correctly, the database may experience various or few auto-grow events.

When SQL Server has to grow a file, all transactions stop. They wait until file growth operation is complete to continue.

These events can introduce unpredictable hits in performance at random times (especially if disks are performing slow).

How do I configure the settings?

A good practice is to change all database file growth options by a large enough MB value instead of a percentage value or low number such as 1MB.

You can use the query below to generate a change script:

Change the growth increment [XXX] that must be large enough to avoid performance penalties.

SELECT 'ALTER DATABASE [' + db_name(s.database_id) + '] MODIFY FILE ( NAME = N''' + s.name + ''', FILEGROWTH = XXXMB)' AS ToExecute
FROM sys.master_files s
INNER JOIN sys.databases db ON s.database_id = db.database_id
WHERE (
		s.is_percent_growth = 1
		OR s.growth * 8.0 / 1024 < 10
		)
	AND db.state_desc = 'online'
ORDER BY s.database_id

The exact value to use in your configuration setting and the choice between a percentage growth and a specific MB size growth depends on many factors in your environment.

Microsoft’s best practices general rule for testing is to set your autogrow setting to about one-eighth the size of the file.

More information

Article by
Mark Varnas
Founder | CEO | SQL Veteran
Hey, I'm Mark, one of the guys behind Red9. I make a living performance tuning SQL Servers and making them more stable.

1 thought on “[Quick Guide] Autogrowth in SQL Server: Best Practices”

  1. Hi Jose,
    Thanks for your information.

    Could you please explain
    Standard Value of Auto growth DATA and Log File Size.

    and also Initial Size

    Reply

Leave a Comment

Managed SQL Server services, consulting, and emergency support from expert DBAs to improve performance, predictability, and cost.

Get started with Red9 today.

Contact us

Discover More

SQL Server Health Check SQL Server Migrations & Upgrades SQL Server Performance Tuning SQL Server Security SQL Server Tips

Discover what clients are saying about Red9

Red9 has incredible expertise both in SQL migration and performance tuning.

The biggest benefit has been performance gains and tuning associated with migrating to AWS and a newer version of SQL Server with Always On clustering. Red9 was integral to this process. The deep knowledge of MSSQL and combined experience of Red9 have been a huge asset during a difficult migration. Red9 found inefficient indexes and performance bottlenecks that improved latency by over 400%.

Rich Staats 5 stars
Rich Staats
Cloud Engineer
MetalToad

Always willing to go an extra mile

Working with Red9 DBAs has been a pleasure. They are great team players and have an expert knowledge of SQL Server database administration. And are always willing to go the extra mile to get the project done.
5 stars
Evelyn A.
Sr. Database Administrator

Boosts server health and efficiency for enhanced customer satisfaction

Since adding Red9 to the reporting and DataWarehousing team, Red9 has done a good job coming up to speed on our environments and helping ensure we continue to meet our customer's needs. Red9 has taken ownership of our servers ensuring they remain healthy by monitoring and tuning inefficient queries.
5 stars
Andrew F.
Datawarehousing Manager
See more testimonials

Check Red9's SQL Server Services

SQL Server Consulting

Perfect for one-time projects like SQL migrations or upgrades, and short-term fixes such as performance issues or SQL remediation.

Learn More

SQL Server Managed Services

Continuous SQL support, proactive monitoring, and expert DBA help with one predictable monthly fee.

Learn More

Emergency SQL Support

Continuous SQL support, proactive monitoring, and expert DBA help with one predictable monthly fee.

Learn More
Explore All Services