Autoshrink automatically reclaims unused database-file space through a periodic SQL Server background task. It seems attractive when storage is expensive or nearly full, but repeatedly shrinking files can cause severe performance problems. section 9.1 section 9.12
Mistake: enabling autoshrink at the storage warning
MagicChoc runs SQL Server in Azure with data-volume utilization near 75 percent. An inexperienced DBA enables autoshrink across four databases. Within an hour, application teams report sharply worse performance as SQL Server repeatedly performs shrink operations. Shrinking also leaves indexes nearly 100 percent fragmented, creating an ongoing loop of poor performance and increased resource use. section 9.1 section 9.12
Use these safer rules:
- Disable autoshrink rather than treating it as capacity management; investigate growth and plan storage deliberately. section 9.12
- If a manual shrink is unavoidable, rebuild all indexes afterward and expect operational impact. section 9.12
