Monday, August 05, 2013

Tuning the Performance of Backup Compression in SQL Server

Here is a great read on Tuning the Performance of Backup Compression in SQL Server

And a cheeky query to help give you a guide on the size of your backup if it was compressed !

b.database_name 'Database Name',
CONVERT (BIGINT, b.backup_size / 1048576 ) 'UnCompressed Backup Size (MB)',
CONVERT (BIGINT, b.compressed_backup_size / 1048576 ) 'Compressed Backup Size (MB)',
CONVERT (NUMERIC (20,2), (CONVERT (FLOAT, b.backup_size) /
CONVERT (FLOAT, b.compressed_backup_size))) 'Compression Ratio',
DATEDIFF (SECOND, b.backup_start_date, b.backup_finish_date) 'Backup Elapsed Time (sec)'
msdb.dbo.backupset b
DATEDIFF (SECOND, b.backup_start_date, b.backup_finish_date) > 0
AND b.backup_size > 0
b.backup_finish_date DESC

Table 1 shows the output of the above query after taking an uncompressed and a compressed backup.
Database NameUncompressed Backup Size (MB)Compressed Backup Size (MB)Compression RatioBackup Time (Seconds)Comments
BCTEST292705959073.051705Compressed backup
BCTEST29270529270513348Uncompressed backup

1 comment:

danlighter said...

This information is really very helpful. SQL server backup database with compression used to reduce database size and improve performance of I/O intensive workload,