Sql-server – Partitioned Database restore is very slow on SQL Server 2012 with SP2

restoresql serversql-server-2012

Team,

We have a Partitioned database which is very small in size(112MB backup size). This is partitioned with 15000 files for one table and 7500 files for other table.

Currently we are running into issues in restore taking significant amount of time which is having implications on application build process.
We tested with both Virtual and Physical hardware.

Please let us know your thoughts on the slowness? We have explored CU6 for SQL Server 2012 SP2 as well with no luck

Regards,
Sharath

Best Answer

Well I don't wonder about the restoring time. I wonder about your file amount. 15k files for 112MB? What the h...?

Your symptom is nearly the same as during file copying. If you have two disc (disc1, disc2) and you try to copy 100.000 files each 4KB in size from disc1 to disc2 it may take hours. If you copy one zip file without compression (containing those files) with 400.000KB file size and then extract it afterwards on disc2, it would take a few seconds.

You'll stressing your I/O subsystem with many I/O operations. Consider to merge those files back to one or just a few. I'm not sure what has driven you to those design?