I've never been clear on this point - should Windows servers running SQL Server ever be defragmented with a tool such as Smart Defrag or Windows' Disk Defragmenter?

  • 2
    Generally, just don't do it. There are very specific situations where it may help, but you could actually do harm to the databases by doing this. If you're using any type of memory based drive (SSD, NVMe, etc.) you're actually hastening the death of the drives by doing this. – Sean Gallardy - Retired User Dec 29 '16 at 17:07

Provided you recon 100% that physical disk fragmentation is significantly affecting sql server performance and you can afford downtime, go for disk defrag.

I have never had to defrag a windows disk hosting sql server databases. You should choose a sensible autogrowth value for your databases and have Instant file initialization enabled.

  • 2
    You can also consider, what will take shorter amount of time...just moving the files to a new clean drive or taking SQL Server down and letting defrag run against the disk. – user507 Dec 29 '16 at 17:58
  • 1
    I agree, just copying of mdfs to another drive and then back, may be enough. Just make sure SQL Service is stopped, even with 'contig' that (in theory) supports online operations. – John Alan Dec 31 '16 at 8:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.