Sql-server – Should I run multiple DBCC Shrinkfile if files are in different disk arrays

shrinksql serversql server 2014

We just deleted about 45% of the data in a database, and we want to reduce the size of the mdf files (now we have a "delete old data job", so it won't grow that much again in the near future).

My question is:

If I execute more than one DBCC Shrinkfile at the same time, and the files are on different array disks, will the total time of shinking be shorter?
Compared against executing DBCC Shrinkfile one file at a time.

This will be executed on a maintenance window, and the idea is to have this maintenance window as short as possible.

Regards

Best Answer

Your task is to reduce the size of mdf file, right?

Shrinking a database by dbcc shrinkdatabase is extremely slow. It is single threaded.

There is a faster way to reduce DB size:

  1. Create new filegroup and allocate space for that filegroup as needed (determine how much space is actually used in the old files)
  2. Move all the data to that filegroup and drop the old one

This solution can be multi threaded so it is going to be much faster