30.06.2013 Views

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 8: Database <strong>Backup</strong> <strong>and</strong> <strong>Restore</strong> with <strong>SQL</strong> <strong>Backup</strong> Pro<br />

Figure 8-7 compares these metrics to those obtained for identical operations using native<br />

backup, compressed native backup, as well as <strong>SQL</strong> <strong>Backup</strong> using a higher compression<br />

level (3).<br />

<strong>Backup</strong> Operation <strong>Backup</strong> File Size<br />

in MB (on disk)<br />

Native Full 501 19.6<br />

252<br />

<strong>Backup</strong> Time<br />

(seconds)<br />

% Difference compared<br />

to Native Full<br />

(+ = bigger / faster)<br />

Size Speed<br />

Native Full with Compression 6.7 4.6 -98.7 +76.5<br />

<strong>SQL</strong> <strong>Backup</strong> Full Compression Level 1 3.7 3.1 -99.3 +84.2<br />

<strong>SQL</strong> <strong>Backup</strong> Full Compression Level 3 7.3 4.5 -98.5 +77<br />

Figure 8-7: Comparing full backup operations for DatabaseFor<strong>SQL</strong><strong>Backup</strong>s (0.5 GB).<br />

<strong>SQL</strong> <strong>Backup</strong> (Compression Level 1) produces a backup file that requires less than 1% of<br />

the space required for the native full backup file. To put this into perspective, in the space<br />

that we could store 3 days' worth of full native backups using native <strong>SQL</strong> <strong>Server</strong>, we could<br />

store nearly 400 <strong>SQL</strong> <strong>Backup</strong> files. It also increases the backup speed by about 84%. How<br />

does that work? Basically, every backup operation reads the data from the disk <strong>and</strong> writes<br />

to a backup-formatted file, on disk. By far the slowest part of the operation is writing the<br />

data to disk. When <strong>SQL</strong> <strong>Backup</strong> (or native compression) performs its task, it is reading all<br />

of the data, passing it through a compression tool <strong>and</strong> writing much smaller segments of<br />

data, so less time is used on the slowest operation.<br />

In this test, <strong>SQL</strong> <strong>Backup</strong> with Compression Level 1 outperformed the native compressed<br />

backup. However, for <strong>SQL</strong> <strong>Backup</strong> with Compression Level 3, their performance was<br />

almost identical. It's interesting to note that while Level 3 compression should, in theory,<br />

have resulted in a smaller file <strong>and</strong> a longer backup time, compared to Level 1, we in fact<br />

saw a larger file <strong>and</strong> a longer backup time! This highlights the importance of selecting the<br />

compression level carefully.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!