I am trying to determine the duration of backup restore. I executed a few restore command to restore some backups located on network share drive. Here is command and summary,
RESTORE DATABASE [test] FROM DISK = '\\network\test.bak' WITH MOVE 'test_data' TO 'D:\test_data.mdf', MOVE 'test_log' TO 'E:\test_log.ldf', CHECKSUM, STATS;
1st restore take about 5 min. Ok, after restore complete, I delete the database
2nd restore take about 1.8 min. Hm.. Let's delete the database and try again.
3rd restore take about 1.5 min. Hm..
Backup B (almost same size as backup A, at the same network location)
1st restore take about 1.8 min. I deleted it and try again
2nd restore take about 1.5 min. Ok..
The service account is enabled for instant file initialization.
My question is why the restore duration varied on different restore attempt on the same backup file to the same machine? Is it purely on network throughput (perhaps someone was doing something on the network share and stuff), or something else like cache or something in SQL internal?